Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] https 설정 제거 #30

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading