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

(Feature request) PWA behind authorization #4611

Closed
Lightirius opened this issue Jan 28, 2024 · 2 comments
Closed

(Feature request) PWA behind authorization #4611

Lightirius opened this issue Jan 28, 2024 · 2 comments

Comments

@Lightirius
Copy link

Describe feature

I have Trilium server instaled behind reverse proxy with centralized authorization for all of my services.
Right now I don't have a button to install Trilum as PWA in Chrome.

Access to manifest file https:///manifest.webmanifest requires authorization, but authorization cookie is not sent with this request by the browser. I don't want to disable authorization on this path

I am not a web developer but based on this documentation https://developer.mozilla.org/en-US/docs/Web/Manifest there must be a crossorigin="use-credentials" attribute on the manifest link for it to work behind authorization.
If I manualy modify the link attribute on the web page in Chrome Dev Tools - I can install PWA and it seems to work fine after that

Additional Information

No response

@Tibael
Copy link

Tibael commented Jan 29, 2024

Same trouble here

If a developper want to fix this I succed to do so by modifying :
src/views/desktop.ejs, line 6 to : <link rel="manifest" crossorigin="use-credentials" href="manifest.webmanifest">
src/views/mobile.ejs, line 9 to : <link rel="manifest" crossorigin="use-credentials" href="manifest.webmanifest">

And with this modifications icon doesn't load anymore so I modify this :
src/public/manifest.webmanifest, line 11 to 20 :

{
      "src": "favicon.ico",
      "sizes": "180x180 512x512",
      "type": "image/x-icon"
}

@zadam zadam closed this as completed in 67cb926 Feb 14, 2024
@zadam
Copy link
Owner

zadam commented Feb 14, 2024

I've made changes as you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants