Skip to content

Friend produces incorrect absolute redirects when behind a proxy #4

@jumarko

Description

@jumarko

A long time ago, they changed friend from using relative URLs to absolute for redirects: cemerick@5b04323

The default :login-uri is /login, which gets used in the "Location" header when generating redirects. Browsers may accept this, but it is not valid according to the HTTP spec, which requires an absolute URI.

However, this broke redirects, in case there's a proxy or a load balancer in front of the app terminating SSL/TLS: cemerick#84

The argument that "it is not valid according to the HTTP spec" hasn't been true for a long time.
There's an updated HTTP spec that allows using relative URLs for redirects: https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.2

I suggest changing the code so it uses relative URLs for redirects again. That way, it will work out of the box.

Other resources:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions