Skip to content

Error 401 with the 'follow-redirects' library since version 1.15.8 #6929

@atjchen

Description

@atjchen

Describe the bug

Hello

My project uses Axios 1.9.0, and axios includes the following dependency:

"dependencies": { "follow-redirects": "^1.15.6" }

However, when the version of follow-redirects is >= 1.15.8, every POST request that returns a 303 with a Location URI fails with a 401 Unauthorized error.

To fix this, I added an override in my package.json:

"overrides": { "axios": { "follow-redirects": "1.15.7" } }

With this override, POST requests with redirects work correctly.

It looks like there’s a bug introduced in follow-redirects version 1.15.8.

The post in github follow redirects:

follow-redirects/follow-redirects#277

To Reproduce

No response

Code snippet

Expected behavior

No response

Axios Version

1.9.0

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

20.18.1

OS

No response

Additional Library Versions

Additional context/Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue::bugThis issue is related to a bug that requires fixing

    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