Wikimedica / mediawiki-extensions-PWA

PWA extension for MediaWiki
GNU General Public License v3.0
2 stars 2 forks source link

Loading manifest.json doesn't work on private wikis #3

Open Stonebubble opened 1 year ago

Stonebubble commented 1 year ago

Although the page is whitelisted in $wgWhitelistRead the manifest.json can't be accessed because the browser calls /index.php?title=MediaWiki:MediaWiki%3AManifest.json&action=raw&ctype=text/json with action=raw which is prohibited and it calls it without cookies so being logged in doesn't help. Accessing the page "MediaWiki:MediaWiki:Manifest.json" as an anonymous user works and accessing the whole link as a logged in user via the searchbar works, too.

Stonebubble commented 1 year ago

PWA-common.css and MediaWiki:PWA-your_PWA's_name-serviceWorker.js also get loaded via this type of link instead of using load.php but at least the browser sends cookies along

bitsofmymind commented 1 year ago

PWA-common.css could be loaded using load.php. As for the service worker and manifest, do you think providing them through an API endpoint (which allows for raw content) would do the trick?