Can't install as PWA behind Cloudflare Access #5154
Replies: 2 comments
-
Thanks for looking into this. I host my instance on cloudflare and have no issues with PWA but your settings might be more strict. There may also be a way to address this via backend. PRs welcome. |
Beta Was this translation helpful? Give feedback.
-
Are you behind Cloudflare access? I have my instance behind a cloudflare tunnel that's protected by cloudflare access - you need to login via Cloudflare before you can even hit it. I think this is what causes the issue - basically:
In any case I think this will fix, but happy for feedback on the approach: #5156 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
First of all, thanks for the project!
If Librechat is hosted behind Cloudflare access then I get the following error in the browser console
Which means I can't install Librechat as a PWA. This seems to be because the manifest is included as
Which doesn't allow the browser to send cookies with the request. Manually adding a
crossorigin
field to allow cookies to be included in this request fixes thisThis doesn't seem to be as easy as I was hoping to fix with vite, but there is some prior art here: vitejs/vite#6648 - would be happy to try to contribute a fix if this method looks appropriate.
Steps to Reproduce
What browsers are you seeing the problem on?
No response
Relevant log output
No response
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions