Skip to content

Commit

Permalink
Merge pull request #30 from softeerbootcamp4th/fix/remove-https
Browse files Browse the repository at this point in the history
[Fix] https 설정 제거
  • Loading branch information
luna156 authored Aug 23, 2024
2 parents 68d7d40 + fb5f129 commit 75027ef
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
34 changes: 17 additions & 17 deletions src/main/java/com/softeer/podoarrival/PodoArrivalApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ public WebMvcConfigurer corsConfigurer() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:8000", "https://www.hyundaiseltos.site") // 허용할 도메인
.allowedOrigins("http://localhost:8000", "https://www.hyundaiseltos.site", "https://d3u0wfxb13l271.cloudfront.net") // 허용할 도메인
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") // 허용할 HTTP 메소드
.allowedHeaders("*"); // 허용할 헤더
}
};
}

@Bean
public ServletWebServerFactory servletContainer() {
// Enable SSL Trafic
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() {
@Override
protected void postProcessContext(Context context) {
SecurityConstraint securityConstraint = new SecurityConstraint();
securityConstraint.setUserConstraint("CONFIDENTIAL");
SecurityCollection collection = new SecurityCollection();
collection.addPattern("/*");
securityConstraint.addCollection(collection);
context.addConstraint(securityConstraint);
}
};
return tomcat;
}
// @Bean
// public ServletWebServerFactory servletContainer() {
// // Enable SSL Trafic
// TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() {
// @Override
// protected void postProcessContext(Context context) {
// SecurityConstraint securityConstraint = new SecurityConstraint();
// securityConstraint.setUserConstraint("CONFIDENTIAL");
// SecurityCollection collection = new SecurityCollection();
// collection.addPattern("/*");
// securityConstraint.addCollection(collection);
// context.addConstraint(securityConstraint);
// }
// };
// return tomcat;
// }
}
12 changes: 6 additions & 6 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ server:
max: 200 # 작업 스레드
# accept-count: 500000 # 요청 대기 큐 크기
# connection-timeout: 600000 # 연결 타임아웃 (밀리초)
ssl:
enabled: true
key-store: ../arrival-server.p12
key-store-password: teampodo
key-store-type: PKCS12
key-alias: softeerbootcamp4th
# ssl:
# enabled: true
# key-store: ../arrival-server.p12
# key-store-password: teampodo
# key-store-type: PKCS12
# key-alias: softeerbootcamp4th

spring:
application:
Expand Down

0 comments on commit 75027ef

Please sign in to comment.