feat: Configure app to serve under /info/ subpath
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-30 20:24:09 +08:00
parent 4e59c0e8a4
commit fec7961114
2 changed files with 6 additions and 3 deletions

View File

@@ -4,11 +4,13 @@ server {
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
location / { location /info/ {
try_files $uri $uri/ /index.html; alias /usr/share/nginx/html/;
try_files $uri $uri/ /info/index.html;
} }
location /assets { location /info/assets/ {
alias /usr/share/nginx/html/assets/;
expires 1y; expires 1y;
add_header Cache-Control "public, immutable"; add_header Cache-Control "public, immutable";
} }

View File

@@ -6,6 +6,7 @@ import {defineConfig, loadEnv} from 'vite';
export default defineConfig(({mode}) => { export default defineConfig(({mode}) => {
const env = loadEnv(mode, '.', ''); const env = loadEnv(mode, '.', '');
return { return {
base: '/info/',
plugins: [react(), tailwindcss()], plugins: [react(), tailwindcss()],
define: { define: {
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY), 'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY),