Skip to content

Requests with manual redirects not working properly #5

@ruochenjia

Description

@ruochenjia

I'm using Bare Client on my websites to bypass CORS policy, but some supported functions did not work as expected.

redirect: "manual" is a supported attribute declared in BareFetchInit, but it seems to have no effects.

const request = new Request("http://1.1.1.1", { // I use this website as an example because it redirects to https with 301 response
	method: "GET",
	redirect: "manual"
});

const response = await bareClient.fetch(request);
// 301 responses should be returned as is, but seems to be followed and returns a redirected response with status 200

response.status // should be '301', but is 200
response.ok // should be false as 'status' is not 200
response.headers.get("location") // should give me the redirect url, but returns null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions