Skip to content
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

import java.security.PublicKey;

Expand Down Expand Up @@ -70,18 +67,4 @@ public JwtTokenProvider jwtTokenProvider() {
PublicKey publicKey = RsaKeyProvider.loadPublicKey(publicKeyPath);
return new JwtTokenProvider(publicKey);
}

@Bean
public CorsConfigurationSource corsConfigurationSource(CorsProperties corsProperties) {
CorsConfiguration config = new CorsConfiguration();
config.setAllowedOrigins(corsProperties.getAllowedOrigins());
config.setAllowedMethods(corsProperties.getAllowedMethods());
config.setAllowedHeaders(corsProperties.getAllowedHeaders());
config.setAllowCredentials(corsProperties.getAllowCredentials());
config.setMaxAge(corsProperties.getMaxAge());

UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", config);
return source;
}
}
18 changes: 0 additions & 18 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,3 @@ vapid:
public: BF8QQIULasLr94n0l0xbv43yZeNICudM5lpQN08VYn2g5VjBPU0wM98HypyRmEb-y0ARRsiZ_wcgSMIC-nq-x20
private: ${VAPID_PRIVATE_KEY}



cors:
allowed-origins:
- "http://localhost:5173"
- "http://localhost:5174"
- "https://pinit.go-gradually.me"
allowed-methods:
- GET
- POST
- PUT
- PATCH
- DELETE
- OPTIONS
allowed-headers:
- "*"
allow-credentials: true
max-age: 3600
Loading