ci(custom): 调整nginx配置
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,3 +2,6 @@ node_modules
|
|||||||
dist
|
dist
|
||||||
*.local
|
*.local
|
||||||
stats.html
|
stats.html
|
||||||
|
|
||||||
|
# Sentry Config File
|
||||||
|
.env.sentry-build-plugin
|
||||||
|
|||||||
@@ -39,11 +39,13 @@ export function createVitePlugins(viteEnv, isBuild, isSENTRY) {
|
|||||||
|
|
||||||
if (isSENTRY) {
|
if (isSENTRY) {
|
||||||
sentryVitePlugin({
|
sentryVitePlugin({
|
||||||
authToken:
|
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||||
'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',
|
|
||||||
org: 'sentry',
|
org: 'sentry',
|
||||||
project: 'jdt-admin',
|
project: 'jdt-admin',
|
||||||
url: 'https://w.huakk.top',
|
url: 'https://w.huakk.top',
|
||||||
|
sourcemaps: {
|
||||||
|
filesToDeleteAfterUpload: ['dist/**/*.js.map'],
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,12 @@ server {
|
|||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
add_header Access-Control-Allow-Headers *;
|
||||||
|
add_header Access-Control-Allow-Methods *;
|
||||||
|
add_header Access-Control-Allow-Credentials true;
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
add_header Cache-Control no-cache;
|
||||||
|
add_header Access-Control-Max-Age 1728000;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
|
|||||||
5955
pnpm-lock.yaml
generated
5955
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@ export const router = createRouter({
|
|||||||
export async function setupRouter(app) {
|
export async function setupRouter(app) {
|
||||||
await addDynamicRoutes()
|
await addDynamicRoutes()
|
||||||
setupRouterGuard(router)
|
setupRouterGuard(router)
|
||||||
// if (import.meta.env.VITE_SENTRY) {
|
if (import.meta.env.VITE_SENTRY) {
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
app,
|
app,
|
||||||
dsn: 'https://adad4faa9b08aa08438ef33cba7962ab@w.huakk.top/6',
|
dsn: 'https://adad4faa9b08aa08438ef33cba7962ab@w.huakk.top/6',
|
||||||
@@ -30,7 +30,7 @@ export async function setupRouter(app) {
|
|||||||
replaysSessionSampleRate: 0.1,
|
replaysSessionSampleRate: 0.1,
|
||||||
replaysOnErrorSampleRate: 1.0,
|
replaysOnErrorSampleRate: 1.0,
|
||||||
})
|
})
|
||||||
// }
|
}
|
||||||
app.use(router)
|
app.use(router)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user