Skip to content

Commit

Permalink
feat: allow CORS for chrome extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
taciturnaxolotl committed Oct 27, 2024
1 parent 19f9cc0 commit 97d5027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func main() {
middlewares.ForceSsl,
cors.Handler(cors.Options{
// AllowedOrigins: []string{"https://foo.com"}, // Use this to allow specific origin hosts
AllowedOrigins: []string{"https://*", "http://*"},
AllowedOrigins: []string{"https://*", "http://*", "chrome-extension://*"},
// AllowOriginFunc: func(r *http.Request, origin string) bool { return true },
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"},
Expand Down

0 comments on commit 97d5027

Please sign in to comment.