Skip to content

Upgrade-Insecure-Requests #28

@joonas-fi

Description

@joonas-fi

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Upgrade-Insecure-Requests

We could use this as a heuristic here:

notSecure := r.TLS == nil
if notSecure && !mount.allowInsecureHTTP { // important that this is done before stripPrefix
redirectHTTPToHTTPS(w, r) // come back when you have TLS, bro

Counter-argument: this allows downgrade attacks by a MITM attacker removing the header

Further analysis required

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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