fix: allow csrf header through cors
This commit is contained in:
parent
eb3c3b7a24
commit
2e188c26f3
@ -56,8 +56,8 @@ func Run(conn *pgx.Conn, q *data.Queries, config SvcConfig) error {
|
|||||||
r.Use(cors.Handler(cors.Options{
|
r.Use(cors.Handler(cors.Options{
|
||||||
AllowedOrigins: config.allowedOrigins(),
|
AllowedOrigins: config.allowedOrigins(),
|
||||||
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
|
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
|
||||||
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"},
|
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-Csrf-Token"},
|
||||||
ExposedHeaders: []string{"List"},
|
ExposedHeaders: []string{"List", "X-Csrf-Token"},
|
||||||
AllowCredentials: true,
|
AllowCredentials: true,
|
||||||
MaxAge: 300,
|
MaxAge: 300,
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user