Skip to content

For http API calls, consider returning an error rather than redirecting to https #530

@anyonecancode

Description

@anyonecancode

What would you like to discuss with us or let us know?

I was reading https://jviide.iki.fi/http-redirects, which I think makes a good argument for having http calls to an API endpoint return an error rather than redirect to https. tl;dr -- for api endpoints, these are generally not meant for browsers, and it becomes easy to accidentally leak secrets as servers will call the plain text http version first.

I saw that mastodon was listed among the servers tried that redirects rather than errors, and confirmed that hachyderm.io does too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Infra TeamRequires review / feedback / etc. with infra team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions