Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Default redirect = follow which is not the same as Cloudflare's runtime #150

Open
mjhaller opened this issue Jun 17, 2020 · 0 comments
Open

Comments

@mjhaller
Copy link

mjhaller commented Jun 17, 2020

With a local cloudworker instance, the default value of redirect is "follow":

addEventListener('fetch', event => {
  event.respondWith(new Response(`request.redirect = ${event.request.redirect}`));
})
$ curl http://localhost:9000
request.redirect = follow

With Cloudflare's runtime it is manual

image

It is clear from the docs - https://developers.cloudflare.com/workers/reference/apis/request/ that this should be manual for the request in the fetchEvent.

[...] Note: default for requests generated from the incoming fetchEvent from the event handler is manual.

This of course leads to some very odd behaviors which are hard to track down. Am I missing something? Why is this follow by default?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant