Skip to content

Commit a86410d

Browse files
committed
move allowed origin to env
1 parent 4226c6c commit a86410d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ services:
3535
DB_NAME: ${DB_NAME:-postgres}
3636
DB_USER: ${DB_USER:-postgres}
3737
DB_PASSWORD: ${DB_PASSWORD:-postgres}
38+
ALLOWED_ORIGIN: ${ALLOWED_ORIGIN:-https://teamserverdown.devops.aet.cit.tum.de}
3839
depends_on:
3940
db:
4041
condition: service_healthy

server/src/main/java/de/tum/cit/aet/devops/teamserverdown/config/SecurityConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public SecurityFilterChain securityFilterChain(
2828
@Bean
2929
public CorsFilter corsFilter() {
3030
CorsConfiguration config = new CorsConfiguration();
31-
config.setAllowedOrigins(List.of("https://teamserverdown.devops.aet.cit.tum.de"));
31+
config.setAllowedOrigins(List.of(System.getenv("ALLOWED_ORIGIN")));
3232
config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"));
3333
config.setAllowedHeaders(List.of("*"));
3434
config.setExposedHeaders(List.of("Authorization"));

0 commit comments

Comments
 (0)