Public Access
fix(cors): expose Retry-After so the login page can show the block time
This commit is contained in:
1 parent
f3b6d67b5b
commit
4ebca75be4
1 file changed
+2
@@ -68,6 +68,8 @@ public class SecurityConfig {
|
||||
configuration.setAllowedOriginPatterns(Arrays.asList(allowedOrigins));
|
||||
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS"));
|
||||
configuration.setAllowedHeaders(List.of("*"));
|
||||
// Lets the login page read how long a rate-limit block lasts
|
||||
configuration.setExposedHeaders(List.of("Retry-After"));
|
||||
configuration.setAllowCredentials(false); // Set to true later if we use cookies
|
||||
|
||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
|
||||
Reference in new issue
Block a user