fix: allow CSV export preflight headers via dynamic CORS Allow-Headers
Stop pinning AllowHeaders to a fixed list so browsers can send Accept and other fetch headers on export requests without failing OPTIONS preflight. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
56c644b0e3
commit
e2c5833081
|
|
@ -154,7 +154,7 @@ func NewApp(
|
||||||
app.Use(cors.New(cors.Config{
|
app.Use(cors.New(cors.Config{
|
||||||
AllowOrigins: "*",
|
AllowOrigins: "*",
|
||||||
AllowMethods: "GET,POST,PUT,PATCH,DELETE,OPTIONS",
|
AllowMethods: "GET,POST,PUT,PATCH,DELETE,OPTIONS",
|
||||||
AllowHeaders: "Content-Type,Authorization,platform",
|
// AllowHeaders empty: preflight echoes Access-Control-Request-Headers (e.g. Accept for CSV export fetch).
|
||||||
ExposeHeaders: "Content-Disposition",
|
ExposeHeaders: "Content-Disposition",
|
||||||
// AllowCredentials: true,
|
// AllowCredentials: true,
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user