Skip to content

Conversation

@rswanson
Copy link
Member

Adds a new config section inside the Project struct for the cors section of the config yaml

Copilot AI review requested due to automatic review settings September 10, 2025 13:05
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

Adds CORS configuration support to the ERPC proxy by introducing a new ErpcProxyCorsConfig struct and integrating it into the ErpcProxyProjectConfig. The changes enable CORS configuration at the project level with fields for allowed origins, methods, headers, exposed headers, credentials, and max age.

  • Added ErpcProxyCorsConfig struct with CORS-specific configuration fields
  • Extended ErpcProxyProjectConfig to include an optional CORS configuration pointer
  • Added comprehensive marshalling logic to handle CORS configuration in YAML output

Reviewed Changes

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

File Description
pkg/erpc-proxy/types.go Defines the new CORS configuration struct and adds it to the project config
pkg/erpc-proxy/erpc-proxy.go Implements CORS configuration marshalling logic in the config generator
pkg/erpc-proxy/marshal_test.go Adds comprehensive test coverage for CORS configuration marshalling scenarios

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@rswanson rswanson merged commit b46d177 into main Sep 10, 2025
2 checks passed
@rswanson rswanson deleted the swanny/erpc-cors branch September 10, 2025 14:00
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