Skip to content

Commit 4000fa8

Browse files
committed
Remove specific profile for frontend, allow any localhost port
1 parent 09a94e5 commit 4000fa8

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ jobs:
3535
java-version: '21'
3636
cache: 'gradle'
3737

38+
- uses: docker/login-action@v3
39+
with:
40+
registry: ghcr.io
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
3844
- name: Set up docker compose environment
3945
run: docker compose up -d
4046

docker-compose.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ services:
1616
course-hub-frontend:
1717
image: ghcr.io/hackyourfuture/course-hub-frontend:latest
1818
container_name: course-hub-frontend
19-
profiles:
20-
- include-frontend
2119
environment:
2220
BACKEND_URL: http://localhost:8080
2321
ports:

src/main/java/net/hackyourfuture/coursehub/SecurityConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
2222
.cors(cors -> cors.configurationSource(request -> {
2323
var config = new CorsConfiguration();
2424
config.addAllowedOriginPattern("http://localhost");
25+
config.addAllowedOriginPattern("http://localhost:*");
2526
config.addAllowedOriginPattern("https://coursehub.hyf.dev");
2627
config.addAllowedHeader("*");
2728
config.addAllowedMethod("*");
29+
config.setAllowCredentials(true);
2830
return config;
2931
}))
3032
.authorizeHttpRequests(auth -> auth.requestMatchers(HttpMethod.POST, "/login", "/register")

0 commit comments

Comments
 (0)