Skip to content

Accept scheme://host entries in TrustedOrigins - #211

Open
AshSgDe29071999 wants to merge 1 commit into
gorilla:mainfrom
AshSgDe29071999:fix/trusted-origins-full-origin
Open

Accept scheme://host entries in TrustedOrigins#211
AshSgDe29071999 wants to merge 1 commit into
gorilla:mainfrom
AshSgDe29071999:fix/trusted-origins-full-origin

Conversation

@AshSgDe29071999

Copy link
Copy Markdown

Fixes #192

TrustedOrigins compared only url.Host, so an entry like https://ui.example.com never matched Origin/Referer checks. README examples use a bare host, but callers who passed a full Origin (including scheme) were rejected after 1.7.3.

Host-only entries still match. Full origins of the form scheme://host[:port] now match as well.

TrustedOrigins only compared against url.Host, so an entry like
https://ui.example.com never matched. Host-only entries still work;
full origins now match as well.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] origin invalid when comparing allowed origins

1 participant