We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a91a992 commit b1c560fCopy full SHA for b1c560f
site/vite.config.ts
@@ -38,6 +38,17 @@ export default defineConfig({
38
},
39
server: {
40
port: process.env.PORT ? Number(process.env.PORT) : 8080,
41
+ headers: {
42
+ // This header corresponds to "src/api/api.ts"'s hardcoded FE token.
43
+ // This is the secret side of the CSRF double cookie submit method.
44
+ // This should be sent on **every** response from the webserver.
45
+ //
46
+ // This is required because in production, the Golang webserver generates
47
+ // this "Set-Cookie" header. The Vite webserver needs to replicate this
48
+ // behavior. Instead of implementing CSRF though, we just use static
49
+ // values for simplicity.
50
+ "Set-Cookie": "csrf_token=JXm9hOUdZctWt0ZZGAy9xiS/gxMKYOThdxjjMnMUyn4=; Path=/; HttpOnly; SameSite=Lax",
51
+ },
52
proxy: {
53
"/api": {
54
ws: true,
0 commit comments