Skip to content

Commit

Permalink
Allow CORS cross origin wildcard in test/staging env
Browse files Browse the repository at this point in the history
  • Loading branch information
matusfaro committed Jan 5, 2024
1 parent 6528229 commit 3931b27
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ quarkus.lambda.handler=authorizer
# - rerun init and init at runtime is mainly to handle AWS SDK usage of Random()
quarkus.native.additional-build-args=\
--native-image-info,\
--verbose,\
-H:TraceClassInitialization=true,\
-H:+PrintClassInitialization,\
-H:ReflectionConfigurationFiles=reflect-config.json,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ public ApiFunctionStack(Construct parent, Options options) {
}

public String getCorsAllowOrigins(final BaseStack stack) {
return switch (corsOrigins) {
case ANY -> "*";
case SITE -> DnsStack.createFqdn(stack, getDeployEnv());
return switch (getDeployEnv()) {
case STAGING, TEST -> "*";
default -> switch (corsOrigins) {
case ANY -> "*";
case SITE -> DnsStack.createFqdn(stack, getDeployEnv());
};
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# - rerun init and init at runtime is mainly to handle AWS SDK usage of Random()
quarkus.native.additional-build-args=\
--native-image-info,\
--verbose,\
-H:TraceClassInitialization=true,\
-H:+PrintClassInitialization,\
-H:ReflectionConfigurationFiles=reflect-config.json,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# - rerun init and init at runtime is mainly to handle AWS SDK usage of Random()
quarkus.native.additional-build-args=\
--native-image-info,\
--verbose,\
-H:TraceClassInitialization=true,\
-H:+PrintClassInitialization,\
-H:ReflectionConfigurationFiles=reflect-config.json,\
Expand Down

0 comments on commit 3931b27

Please sign in to comment.