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

Allow PWA Manifest to work behind CF Access / certain proxy configs #2215

Merged
merged 1 commit into from
Dec 19, 2022
Merged

Conversation

jwalker343
Copy link
Contributor

I am running this app behind Cloudflare Access. Cloudflare Access (and potentially other proxies) ensure that there is a specific authorization cookie on each request going through the proxy. Requests without this cookie get redirected to the login page, or blocked.

It appears that from spec when using a link tag specifically with rel="manifest" the cors crossorigin attribute is set to anonymous/omit and cookies are stripped from the request by the browser. This is documented here: w3c/manifest#535 with links to several other apps that have implemented similar solutions.

This change allows the browser to pass cookies with the request and properly retrieve the manifest.json file, which allows the PWA to be installed as expected.

@vabene1111
Copy link
Collaborator

thank you very much for the well documented and reasoned PR. I will need to look at the sources you linked to verifiy this for myself just for security but should not be a problem, will get this merged with the next release if i dont have any further questions.

@vabene1111 vabene1111 merged commit 7d7803a into TandoorRecipes:develop Dec 19, 2022
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.

2 participants