File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
src/main/java/de/splayfer/web_backend Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1- package de .splayfer .web_backend . authentication ;
1+ package de .splayfer .web_backend ;
22
3+ import de .splayfer .web_backend .authentication .JwtAuthenticationFilter ;
4+ import de .splayfer .web_backend .authentication .JwtService ;
35import org .springframework .context .annotation .Bean ;
46import org .springframework .context .annotation .Configuration ;
57import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
Original file line number Diff line number Diff line change 1+ package de .splayfer .web_backend ;
2+
3+ import org .springframework .context .annotation .Configuration ;
4+ import org .springframework .web .servlet .config .annotation .CorsRegistry ;
5+ import org .springframework .web .servlet .config .annotation .WebMvcConfigurer ;
6+
7+ @ Configuration
8+ public class WebConfig implements WebMvcConfigurer {
9+ @ Override
10+ public void addCorsMappings (CorsRegistry registry ) {
11+ registry .addMapping ("/**" )
12+ .allowedOrigins ("*" ) // Im Livebetrieb: frontend-Domain eintragen
13+ .allowedMethods ("*" )
14+ .allowedHeaders ("*" );
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments