mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-04 14:13:13 +00:00
chore(ui): forward dev proxy origin for dashboard csrf guard
This commit is contained in:
1 parent
e57bded451
commit
e81fd80944
1 file changed
+9
-1
+9
-1
@@ -62,10 +62,18 @@ export default defineConfig({
|
||||
allow: [UI_ROOT, REPO_ROOT],
|
||||
},
|
||||
proxy: {
|
||||
'/api': 'http://localhost:3000',
|
||||
// The dashboard's CSRF guard rejects loopback origins on a different
|
||||
// port, so the dev proxy must present the API server's own origin.
|
||||
'/api': {
|
||||
target: 'http://localhost:3000',
|
||||
changeOrigin: true,
|
||||
headers: { origin: 'http://localhost:3000' },
|
||||
},
|
||||
'/ws': {
|
||||
target: 'ws://localhost:3000',
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
headers: { origin: 'http://localhost:3000' },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user