Skip to content

Upgrade-Insecure-Requests #28

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions