Skip to content

Dynamically includin the request http host as a stateful domain#563

Closed
denjaland wants to merge 1 commit intolaravel:4.xfrom
denjaland:4.x
Closed

Dynamically includin the request http host as a stateful domain#563
denjaland wants to merge 1 commit intolaravel:4.xfrom
denjaland:4.x

Conversation

@denjaland
Copy link
Contributor

When running an application that is hosted from multiple domain names which can be dynamically added to the system, sanctum currently doesn't support dynamically adding these domain names to the stateful domain list in the configuration file (since configuration is cached).

However, since our frontend is always caling the API on the same domain, treating the request http host as one of the domain names to be considered stateful, would solve this issue.

Personally, I didn't really see a case where a domain name request coming from the same domain as the backend server should not be considered a stateful SPA request, but I contributed the change by introducing a new configuration parameter that allows you to activate the feature from within configuration as to remain backwards compatible by default.

…as a domain to be included in the stateful domain list.
@github-actions
Copy link

Thanks for submitting a PR!

In order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. For information on how to do this, see the relevant GitHub documentation. Additionally, GitHub doesn't allow maintainer permissions from organization accounts. Please resubmit this PR from a personal GitHub account with maintainer permissions enabled.

@github-actions github-actions bot closed this Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant