Skip to content

Missleading origin error message #247

@laliluna

Description

@laliluna

When a proxy does not correctly set the origin, I found the error message is missleading.

I got
Accept failed: failed to accept WebSocket connection: request Origin "http://localhost:5555" is not authorized for Host "localhost:9000"

so I introduced
OriginPatterns: []string{"http://localhost:5555"},

But the code is expecting the origin without the trailling http://

The error message in authenticateOrigin could use the value, it is actually checking, ie. u.Host instead of origin

return fmt.Errorf("request Origin %q is not authorized for Host %q", origin, r.Host)

Cheers Sebastian

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy