Skip to content

Need Environment-Specific CORS Origin Configuration in Java Server #778

@dpacheco-groupieticket

Description

@dpacheco-groupieticket

Description:

When using the Smithy-generated Java server, we need to configure CORS origins differently per deployment environment (e.g., beta vs prod). Currently, the @cors trait requires static values in the model, which doesn't support this use case.

Problem:

  • Our CORS origins vary by environment (mybeta.example.com vs myprod.example.com)
  • Environment variables are our standard configuration mechanism

Question:

What is the recommended approach to implement environment-specific CORS origins? If library modifications are needed, could you provide guidance on:

  • Where in the codebase this would need to be changed
  • Any extension points we could leverage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions