Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve :check_origin docs. #6062

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/phoenix/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ defmodule Phoenix.Endpoint do
if so, the level

* `:check_origin` - if the transport should check the origin of requests when
the `origin` header is present. May be `true`, `false`, a list of hosts that
the `origin` header is present. May be `true`, `false`, a list of URIs that
are allowed, or a function provided as MFA tuple. Defaults to `:check_origin`
setting at endpoint configuration.

Expand All @@ -839,8 +839,8 @@ defmodule Phoenix.Endpoint do
Only use in development, when the host is truly unknown or when
serving clients that do not send the `origin` header, such as mobile apps.

You can also specify a list of explicitly allowed origins. Wildcards are
supported.
You can also specify a list of explicitly allowed origins. Each origin may include
scheme, host, and port. Wildcards are supported.

check_origin: [
"https://example.com",
Expand Down
Loading