ci(custom): 调整nginx配置
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,3 +2,6 @@ node_modules
|
||||
dist
|
||||
*.local
|
||||
stats.html
|
||||
|
||||
# Sentry Config File
|
||||
.env.sentry-build-plugin
|
||||
|
||||
@@ -39,11 +39,13 @@ export function createVitePlugins(viteEnv, isBuild, isSENTRY) {
|
||||
|
||||
if (isSENTRY) {
|
||||
sentryVitePlugin({
|
||||
authToken:
|
||||
'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',
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
org: 'sentry',
|
||||
project: 'jdt-admin',
|
||||
url: 'https://w.huakk.top',
|
||||
sourcemaps: {
|
||||
filesToDeleteAfterUpload: ['dist/**/*.js.map'],
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
42
default.conf
42
default.conf
@@ -1,18 +1,24 @@
|
||||
server {
|
||||
# 监听ipv4
|
||||
listen 80;
|
||||
# 监听ipv6
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
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;
|
||||
}
|
||||
}
|
||||
server {
|
||||
# 监听ipv4
|
||||
listen 80;
|
||||
# 监听ipv6
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
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;
|
||||
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) {
|
||||
await addDynamicRoutes()
|
||||
setupRouterGuard(router)
|
||||
// if (import.meta.env.VITE_SENTRY) {
|
||||
Sentry.init({
|
||||
app,
|
||||
dsn: 'https://adad4faa9b08aa08438ef33cba7962ab@w.huakk.top/6',
|
||||
integrations: [
|
||||
new Sentry.BrowserTracing({
|
||||
tracePropagationTargets: ['localhost', /^https:\/\/w\.huakk\.top\/api/],
|
||||
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
|
||||
}),
|
||||
new Sentry.Replay(),
|
||||
],
|
||||
tracesSampleRate: 1.0,
|
||||
replaysSessionSampleRate: 0.1,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
})
|
||||
// }
|
||||
if (import.meta.env.VITE_SENTRY) {
|
||||
Sentry.init({
|
||||
app,
|
||||
dsn: 'https://adad4faa9b08aa08438ef33cba7962ab@w.huakk.top/6',
|
||||
integrations: [
|
||||
new Sentry.BrowserTracing({
|
||||
tracePropagationTargets: ['localhost', /^https:\/\/w\.huakk\.top\/api/],
|
||||
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
|
||||
}),
|
||||
new Sentry.Replay(),
|
||||
],
|
||||
tracesSampleRate: 1.0,
|
||||
replaysSessionSampleRate: 0.1,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
})
|
||||
}
|
||||
app.use(router)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user