mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
fix(sse): support sub-dir deployment
This commit is contained in:
parent
855c3375f8
commit
1396cbf096
3 changed files with 8 additions and 2 deletions
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
|
@ -6,6 +6,7 @@ on:
|
|||
- 'weblate'
|
||||
paths:
|
||||
- "app/**/*.js"
|
||||
- "app/**/*.ts"
|
||||
- "app/**/*.vue"
|
||||
- "app/src/language/**/*.po"
|
||||
- "app/i18n.json"
|
||||
|
|
|
@ -62,7 +62,9 @@ export const useSelfCheckStore = defineStore('selfCheck', () => {
|
|||
try {
|
||||
await selfCheck.fix(taskName)
|
||||
await nextTick()
|
||||
setTimeout(() => {
|
||||
check()
|
||||
}, 1000)
|
||||
}
|
||||
finally {
|
||||
fixing[taskName] = false
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import type { SSEvent } from 'sse.js'
|
||||
import { urlJoin } from '@/lib/helper'
|
||||
import { useUserStore } from '@/pinia'
|
||||
import { SSE } from 'sse.js'
|
||||
|
||||
|
@ -37,7 +38,9 @@ export function useSSE() {
|
|||
reconnectInterval = 5000,
|
||||
} = options
|
||||
|
||||
const sse = new SSE(url, {
|
||||
const fullUrl = urlJoin(window.location.pathname, url)
|
||||
|
||||
const sse = new SSE(fullUrl, {
|
||||
headers: {
|
||||
Authorization: token.value,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue