Skip to content

Commit

Permalink
Merge pull request #118 from GoormJeans/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
devkeon committed Dec 27, 2023
2 parents 7d21ce4 + 5ad11c9 commit 360a609
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import java.util.List;

//@Configuration
@Configuration
public class CorsConfig {

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ public class SecurityConfig {
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
// TODO
//.cors(c-> c.configurationSource(corsConfig.corsConfigurationSource())) // 🌟 cors 커스텀
// cors disable test
.cors(c->c.disable())
.cors(c-> c.configurationSource(corsConfig.corsConfigurationSource())) // 🌟 cors 커스텀
.formLogin(f->f.disable()) // FormLogin 사용 X
.httpBasic(h->h.disable()) // httpBasic 사용 X
.csrf(c->c.disable()) // csrf 보안 사용 X
Expand Down
13 changes: 0 additions & 13 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization';

if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
}
}
}

0 comments on commit 360a609

Please sign in to comment.