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'],
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
42
default.conf
42
default.conf
@@ -1,18 +1,24 @@
|
|||||||
server {
|
server {
|
||||||
# 监听ipv4
|
# 监听ipv4
|
||||||
listen 80;
|
listen 80;
|
||||||
# 监听ipv6
|
# 监听ipv6
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html;
|
add_header Access-Control-Allow-Headers *;
|
||||||
index index.html index.htm;
|
add_header Access-Control-Allow-Methods *;
|
||||||
try_files $uri $uri/ /index.html;
|
add_header Access-Control-Allow-Credentials true;
|
||||||
}
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
add_header Cache-Control no-cache;
|
||||||
error_page 500 502 503 504 /50x.html;
|
add_header Access-Control-Max-Age 1728000;
|
||||||
location = /50x.html {
|
root /usr/share/nginx/html;
|
||||||
root /usr/share/nginx/html;
|
index index.html index.htm;
|
||||||
}
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
5955
pnpm-lock.yaml
generated
5955
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -15,22 +15,22 @@ 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',
|
||||||
integrations: [
|
integrations: [
|
||||||
new Sentry.BrowserTracing({
|
new Sentry.BrowserTracing({
|
||||||
tracePropagationTargets: ['localhost', /^https:\/\/w\.huakk\.top\/api/],
|
tracePropagationTargets: ['localhost', /^https:\/\/w\.huakk\.top\/api/],
|
||||||
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
|
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
|
||||||
}),
|
}),
|
||||||
new Sentry.Replay(),
|
new Sentry.Replay(),
|
||||||
],
|
],
|
||||||
tracesSampleRate: 1.0,
|
tracesSampleRate: 1.0,
|
||||||
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