Skip to content

Commit

Permalink
fix: expose X-Supabase-Api-Version header in CORS (supabase#1612)
Browse files Browse the repository at this point in the history
  • Loading branch information
hf authored and LashaJini committed Nov 15, 2024
1 parent a6a38a9 commit e3f1b6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ func NewAPIWithVersion(globalConfig *conf.GlobalConfiguration, db *storage.Conne

corsHandler := cors.New(cors.Options{
AllowedMethods: []string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete},
AllowedHeaders: globalConfig.CORS.AllAllowedHeaders([]string{"Accept", "Authorization", "Content-Type", "X-Client-IP", "X-Client-Info", audHeaderName, useCookieHeader}),
ExposedHeaders: []string{"X-Total-Count", "Link"},
AllowedHeaders: globalConfig.CORS.AllAllowedHeaders([]string{"Accept", "Authorization", "Content-Type", "X-Client-IP", "X-Client-Info", audHeaderName, useCookieHeader, APIVersionHeaderName}),
ExposedHeaders: []string{"X-Total-Count", "Link", APIVersionHeaderName},
AllowCredentials: true,
})

Expand Down

0 comments on commit e3f1b6d

Please sign in to comment.