init config edit

This commit is contained in:
qiaofeng1227 2023-08-12 16:36:28 +08:00
parent 5439b7df3b
commit b38d78ead3
3 changed files with 6 additions and 4 deletions

View file

@ -17,7 +17,7 @@ server {
rewrite ^/locales/(.*) /portainer/locales/$1 break; rewrite ^/locales/(.*) /portainer/locales/$1 break;
} }
location /portainer/ { location /portainer/ {
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme; proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
@ -35,9 +35,10 @@ server {
return 204; return 204;
} }
set $quot_tmp "\""; set $quot_tmp "\"";
set $portainer_jwt "${quot_tmp}${arg_portainer_jwt}${quot_tmp}"; # set $portainer_jwt "${quot_tmp}${arg_portainer_jwt}${quot_tmp}";
set $portainer_jwt "${quot_tmp}${cookie_portainerJWT}${quot_tmp}";
sub_filter '</head>' "<script>($portainer_jwt)?window.localStorage.setItem('portainer.JWT', '$portainer_jwt'):null;</script></head>"; sub_filter '</head>' "<script>($portainer_jwt)?window.localStorage.setItem('portainer.JWT', '$portainer_jwt'):null;</script></head>";
sub_filter_once off; sub_filter_once on;
sub_filter_types *; sub_filter_types *;
} }

View file

@ -455,7 +455,7 @@ EditMenu(){
echo "Start to Edit Cockpit Menu ..." echo "Start to Edit Cockpit Menu ..."
# uninstall plugins # uninstall plugins
rm -rf /usr/share/cockpit/apps /usr/share/cockpit/selinux /usr/share/cockpit/kdump /usr/share/cockpit/sosreport /usr/share/cockpit/packagekit rm -rf /usr/share/cockpit/apps /usr/share/cockpit/selinux /usr/share/cockpit/kdump /usr/share/cockpit/sosreport
cp -r /data/apps/websoft9/cockpit/menu_override/* /etc/cockpit cp -r /data/apps/websoft9/cockpit/menu_override/* /etc/cockpit
echo "---------------------------------- Install success! When installation completed, you can access it by: http://Internet IP:9000 and using Linux user for login to install a app by websoft9's appstore. -------------------------------------------------------" echo "---------------------------------- Install success! When installation completed, you can access it by: http://Internet IP:9000 and using Linux user for login to install a app by websoft9's appstore. -------------------------------------------------------"

View file

@ -19,6 +19,7 @@
"37" "37"
], ],
"RedHat": [ "RedHat": [
"9",
"8", "8",
"7" "7"
], ],