diff --git a/Dockerfile b/Dockerfile index bffadcd96e8dd41f61636f4c45ff748047b9047c..4f3146f16cf71f3eb8a1383f2249af485f1360e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,14 +83,17 @@ RUN touch /var/run/nginx.pid \ && echo "export TMOUT=1800 readonly TMOUT" >> /etc/profile \ && rm -rf /usr/bin/gdb* \ && rm -rf /usr/share/gdb \ - && rm -rf /usr/share/gcc-10.3.1 \ + && rm -rf /usr/share/gcc-12 \ + && rm -rf /usr/lib64/python3.11/pdb.py \ && yum remove gdb-gdbserver findutils passwd shadow -y COPY ./deploy/monitor.sh ./deploy/entrypoint.sh /etc/nginx RUN chmod 500 /etc/nginx/monitor.sh \ && chmod 500 /etc/nginx/entrypoint.sh \ && chown nginx:nginx /etc/nginx/monitor.sh \ - && chown nginx:nginx /etc/nginx/entrypoint.sh + && chown nginx:nginx /etc/nginx/entrypoint.sh \ + && sed -i "/PATH=/d" /home/nginx/.bashrc \ + && source /home/nginx/.bashrc EXPOSE 8080 diff --git a/app/.vitepress/config.ts b/app/.vitepress/config.ts index d191cc856fb1a3fbf502950c2abf31b314ea55ff..115e618bdec8424a4c9dd08f498d1adde892f051 100644 --- a/app/.vitepress/config.ts +++ b/app/.vitepress/config.ts @@ -27,12 +27,6 @@ const config: UserConfig = { content: 'data engine,big data,distributed,reliable,low latency', }, ], - [ - 'script', - { - src: '/check-dark-mode.js', - }, - ], ], locales: { root: { diff --git a/app/.vitepress/public/check-dark-mode.js b/app/.vitepress/public/check-dark-mode.js deleted file mode 100644 index 10c76036d9b4b54068c5d6d2e0c4766c054ce930..0000000000000000000000000000000000000000 --- a/app/.vitepress/public/check-dark-mode.js +++ /dev/null @@ -1,19 +0,0 @@ -function getCookie(key) { - const name = `${encodeURIComponent(key)}=`; - const decodedCookies = decodeURIComponent(document.cookie); - const cookies = decodedCookies.split('; '); - for (let cookie of cookies) { - if (cookie.startsWith(name)) { - return cookie.substring(name.length); - } - } - - return null; -} - -const e = getCookie('openLooKeng-theme-appearance') || 'auto'; -const a = window.matchMedia('(prefers-color-scheme: dark)').matches; -if (!e || e === 'auto' ? a : e === 'dark') { - document.documentElement.classList.add('dark'); - document.documentElement.setAttribute('data-o-theme', 'dark'); -} diff --git a/app/.vitepress/src/components/AppHeader.vue b/app/.vitepress/src/components/AppHeader.vue index 5c8aed7796fdc905173f7814b3078bb4c7926d19..07407cdd3be673c526dd906abcabad91cd54a3d1 100644 --- a/app/.vitepress/src/components/AppHeader.vue +++ b/app/.vitepress/src/components/AppHeader.vue @@ -5,7 +5,6 @@ import { NavItem } from '@/shared/@type/interface'; import { useCommonStore } from '@/stores/common'; import { windowOpen } from '@/shared/utils'; -import AppTheme from './AppTheme.vue'; import AppLanguage from './AppLanguage.vue'; import IconLightLogo from '@/assets/openlookeng-logo.svg'; @@ -132,7 +131,6 @@ const langShow = ref(['zh', 'en']);
-
@@ -154,7 +152,6 @@ const langShow = ref(['zh', 'en']); >
- ({ - theme: '', + theme: 'light', poweredIndex: 0, }), }); diff --git a/deploy/nginx/nginx.conf b/deploy/nginx/nginx.conf index a4f729ecd7a373df96b750bf55c91542d5d8db79..f58101dc735cf94812b32d92eafaeaeeb3fc69f3 100644 --- a/deploy/nginx/nginx.conf +++ b/deploy/nginx/nginx.conf @@ -14,10 +14,6 @@ events { http { include /etc/nginx/mime.types; - log_format main '[$time_local] remote_addr: $remote_addr, request: "$request", ' - 'status: $status, body_bytes_sent: $body_bytes_sent, http_referer: "$http_referer", ' - 'http_user_agent: "$http_user_agent", http_x_forwarded_for: "$http_x_forwarded_for"'; - access_log /dev/stdout main; server_tokens off; @@ -60,7 +56,7 @@ http { add_header X-Frame-Options DENY; add_header X-Content-Type-Options nosniff; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; - add_header Content-Security-Policy "script-src 'self' *.baidu.com 'unsafe-inline' 'unsafe-eval'; object-src 'none'; frame-src 'none'"; + add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval'; object-src 'none'; frame-src 'none'"; add_header Cache-Control "no-cache,no-store,must-revalidate"; add_header Pragma no-cache; add_header Expires 0; @@ -87,7 +83,7 @@ http { return 403; } - if ($request_method !~ ^(GET|HEAD|POST)$) { + if ($request_method !~ ^(GET|POST)$) { return 444; } @@ -110,7 +106,7 @@ http { add_header X-Frame-Options DENY; add_header X-Content-Type-Options nosniff; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; - add_header Content-Security-Policy "script-src 'self' *.baidu.com 'unsafe-inline' 'unsafe-eval' ; object-src 'none'; frame-src 'none'"; + add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval'; object-src 'none'; frame-src 'none'"; add_header Cache-Control "public,max-age=1209600"; }