@@ -45,19 +45,20 @@ func Build() fx.Option {
45
45
fx .Provide (func (as * authentication.State , l * zap.Logger , cfg config.Config ) chi.Router {
46
46
router := chi .NewRouter ()
47
47
48
- origins := []string {
49
- "http://localhost:3000" , // Local development, `npm run dev`
50
- cfg .LauncherBackendAddress , // Launcher backend address
51
- cfg .PublicWebAddress , // Live public website
52
- }
48
+ // Just use *, people actually use our api publicly
49
+ // origins := []string{
50
+ // "http://localhost:3000", // Local development, `npm run dev`
51
+ // cfg.LauncherBackendAddress, // Launcher backend address
52
+ // cfg.PublicWebAddress, // Live public website
53
+ // }
53
54
54
- l .Debug ("preparing router" , zap .Strings ("origins" , origins ))
55
+ // l.Debug("preparing router", zap.Strings("origins", origins))
55
56
56
57
router .Use (
57
58
web .WithLogger ,
58
59
web .WithContentType ,
59
60
cors .Handler (cors.Options {
60
- AllowedOrigins : origins ,
61
+ AllowedOrigins : [] string { "*" } ,
61
62
AllowedMethods : []string {"GET" , "POST" , "PUT" , "PATCH" , "DELETE" , "OPTIONS" },
62
63
AllowedHeaders : []string {"Accept" , "Authorization" , "Content-Type" , "Content-Length" , "X-CSRF-Token" },
63
64
ExposedHeaders : []string {"Link" , "Content-Length" , "X-Ratelimit-Limit" , "X-Ratelimit-Reset" },
0 commit comments