Currently, when MITM is enabled and [URL Rewrite]
specifies 302, Surge returns HTTP/2 302
:
HTTP/2 302
content-length: 0
location: [Target]
However, when the request is performed by fetch
/ XMLHttpRequest
toward a third-party origin inside a browser, the 302 redirect without CORS headers will fail.
Is it possible for Surge to add a new directive (maybe 302-cors
?) to add simple CORS headers (as follows)?
HTTP/2 302
content-length: 0
location: [Target]
access-control-allow-origin: *
access-control-expose-headers: *
timing-allow-origin: *