Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Missleading origin error message #247

Closed
Milestone
@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 traillinghttp://

The error message inauthenticateOrigin 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


      [8]ページ先頭

      ©2009-2025 Movatter.jp