1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jellyseerr_ynh.git synced 2024-09-03 19:26:18 +02:00

Update nginx.conf

This commit is contained in:
Thomas 2024-03-09 18:08:44 +01:00 committed by GitHub
parent 4e1c5b6e1b
commit fa125e04d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,6 @@ location ^~ __PATH__/ {
# Sub filters to replace hardcoded paths # Sub filters to replace hardcoded paths
proxy_set_header Accept-Encoding ""; proxy_set_header Accept-Encoding "";
sub_filter_once off;
sub_filter_types *; sub_filter_types *;
#https://stackoverflow.com/questions/19700871/how-to-inject-custom-content-via-nginx #https://stackoverflow.com/questions/19700871/how-to-inject-custom-content-via-nginx
sub_filter '</head>' '<script language="javascript">(()=>{var t="$app";let e=history.pushState;history.pushState=function a(){arguments[2]&&!arguments[2].startsWith("/"+t)&&(arguments[2]="/"+t+arguments[2]);let s=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),s};let a=history.replaceState;history.replaceState=function e(){arguments[2]&&!arguments[2].startsWith("/"+t)&&(arguments[2]="/"+t+arguments[2]);let s=a.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),s},window.addEventListener("popstate",()=>{console.log("popstate")})})();</script></head>'; sub_filter '</head>' '<script language="javascript">(()=>{var t="$app";let e=history.pushState;history.pushState=function a(){arguments[2]&&!arguments[2].startsWith("/"+t)&&(arguments[2]="/"+t+arguments[2]);let s=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),s};let a=history.replaceState;history.replaceState=function e(){arguments[2]&&!arguments[2].startsWith("/"+t)&&(arguments[2]="/"+t+arguments[2]);let s=a.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),s},window.addEventListener("popstate",()=>{console.log("popstate")})})();</script></head>';
@ -34,4 +33,4 @@ location ^~ __PATH__/ {
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
} }