Fixed issue with service worker scope
This commit is contained in:
parent
f37996fdf6
commit
ef6219e8c4
|
@ -13,6 +13,21 @@ This release includes a full redesign of our navigation, player and queue. Overa
|
||||||
a better, less confusing experience, especially on mobile devices. This redesign was suggested
|
a better, less confusing experience, especially on mobile devices. This redesign was suggested
|
||||||
14 months ago, and took a while, but thanks to the involvement and feedback of many people, we got it done!
|
14 months ago, and took a while, but thanks to the involvement and feedback of many people, we got it done!
|
||||||
|
|
||||||
|
Progressive web app [Manual change suggested, non-docker only]
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
We've made Funkwhale's Web UI a Progressive Web Application (PWA), in order to improve the user experience
|
||||||
|
during offline use, and on mobile devices.
|
||||||
|
|
||||||
|
In order to fully benefit from this change, if your pod isn't deployed using Docker, ensure
|
||||||
|
the following instruction is present in your nginx configuration::
|
||||||
|
|
||||||
|
location /front/ {
|
||||||
|
# Add the following line in the /front/ location
|
||||||
|
add_header Service-Worker-Allowed "/";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Improved search performance
|
Improved search performance
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ server {
|
||||||
location /front/ {
|
location /front/ {
|
||||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:";
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:";
|
||||||
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
||||||
|
add_header Service-Worker-Allowed "/";
|
||||||
add_header X-Frame-Options "ALLOW";
|
add_header X-Frame-Options "ALLOW";
|
||||||
alias /frontend/;
|
alias /frontend/;
|
||||||
expires 30d;
|
expires 30d;
|
||||||
|
|
|
@ -86,7 +86,7 @@ server {
|
||||||
location /front/ {
|
location /front/ {
|
||||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:";
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:";
|
||||||
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
||||||
|
add_header Service-Worker-Allowed "/";
|
||||||
add_header X-Frame-Options "SAMEORIGIN";
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
alias ${FUNKWHALE_FRONTEND_PATH}/;
|
alias ${FUNKWHALE_FRONTEND_PATH}/;
|
||||||
expires 30d;
|
expires 30d;
|
||||||
|
|
|
@ -76,6 +76,7 @@ http {
|
||||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:";
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:";
|
||||||
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
||||||
add_header X-Frame-Options "SAMEORIGIN";
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
|
add_header Service-Worker-Allowed "/";
|
||||||
# uncomment the following line and comment the proxy-pass one
|
# uncomment the following line and comment the proxy-pass one
|
||||||
# to use the frontend build with "yarn build"
|
# to use the frontend build with "yarn build"
|
||||||
#alias /frontend/dist/;
|
#alias /frontend/dist/;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import store from './store'
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
register(`${process.env.BASE_URL}service-worker.js`, {
|
register(`${process.env.BASE_URL}service-worker.js`, {
|
||||||
|
registrationOptions: { scope: '/' },
|
||||||
ready () {
|
ready () {
|
||||||
console.log(
|
console.log(
|
||||||
'App is being served from cache by a service worker.'
|
'App is being served from cache by a service worker.'
|
||||||
|
|
Loading…
Reference in New Issue