Skip to content

Commit

Permalink
fix: CORS errors with additional headers in local dev
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbillman committed Nov 13, 2024
1 parent b66fe24 commit bb89de3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/controller/timeline/events_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (s *Service) insertHTTPIngress(ctx context.Context, querier sql.Querier, in
return fmt.Errorf("failed to encrypt ingress payload: %w", err)
}

log.FromContext(ctx).Warnf("Inserting ingress event for %s %s", ingress.RequestKey, ingress.Path)
log.FromContext(ctx).Debugf("Inserting ingress event for %s %s", ingress.RequestKey, ingress.Path)

err = libdal.TranslatePGError(querier.InsertTimelineIngressEvent(ctx, sql.InsertTimelineIngressEventParams{
DeploymentKey: ingress.DeploymentKey,
Expand Down
2 changes: 2 additions & 0 deletions frontend/cli/cmd_serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ func (s *serveCmd) run(
}
s.CommonConfig.AllowOrigins = append(s.CommonConfig.AllowOrigins, addr)
}
// Allow all headers for console requests in local dev mode.
s.CommonConfig.AllowHeaders = append(s.CommonConfig.AllowHeaders, "*")

provisionerAddresses := make([]*url.URL, 0, s.Provisioners)
for range s.Provisioners {
Expand Down

0 comments on commit bb89de3

Please sign in to comment.