Skip to content

Conversation

@masv3971
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes hardcoded CORS allowlisted origins from the API gateway HTTP server and makes them configurable via YAML.

Changes:

  • Added CORS configuration to APIServer in the config model.
  • Updated API gateway HTTP server to read allowed origins from config instead of a hardcoded list.
  • Updated config.yaml to include the new apigw.api_server.cors.allowed_origins setting.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
pkg/model/config.go Introduces a CORS config struct and adds it to APIServer so origins can be configured via YAML.
internal/apigw/httpserver/service.go Replaces hardcoded origins with s.cfg.APIGW.APIServer.CORS.AllowedOrigins when configuring gin-contrib/cors middleware.
config.yaml Adds apigw.api_server.cors.allowed_origins values to the example/default config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@masv3971 masv3971 merged commit 020426e into main Jan 23, 2026
10 of 11 checks passed
@masv3971 masv3971 deleted the masv_config-cors branch January 23, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants