Skip to content

Commit

Permalink
Edit origin (#32)
Browse files Browse the repository at this point in the history
* dev4 update: app.go

* dev4 update: router.go
  • Loading branch information
Gvidow authored Feb 25, 2024
1 parent f4b29eb commit ecc73f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/api/server/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func (r Router) RegisterRoute(handler *deliveryHTTP.HandlerHTTP, wsHandler *deli
cfgCSRF.PathToGet = "/api/v1/csrf"

c := cors.New(cors.Options{
AllowedOrigins: []string{"https://pinspire.online", "https://pinspire.online:1443",
"https://pinspire.online:1444", "https://pinspire.online:1445", "https://pinspire.online:1446", "https://pinspire.online:8081"},
AllowedOrigins: []string{"https://pinspire.site", "https://pinspire.site:1443",
"https://pinspire.site:1444", "https://pinspire.site:1445", "https://pinspire.site:1446", "https://pinspire.site:8081"},
AllowedMethods: []string{http.MethodGet, http.MethodPost, http.MethodDelete, http.MethodPut},
AllowCredentials: true,
AllowedHeaders: []string{"content-type", cfgCSRF.Header},
Expand Down
2 changes: 1 addition & 1 deletion internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func Run(ctx context.Context, log *log.Logger, cfg ConfigFiles) {
})

wsHandler := deliveryWS.New(log, messageCase, notifyCase,
deliveryWS.SetOriginPatterns([]string{"pinspire.online", "pinspire.online:*"}))
deliveryWS.SetOriginPatterns([]string{"pinspire.site", "pinspire.site:*"}))

cfgServ, err := server.NewConfig(cfg.ServerConfigFile)
if err != nil {
Expand Down

0 comments on commit ecc73f0

Please sign in to comment.