Commit 83c70a7d authored by Andreas Gärtner's avatar Andreas Gärtner

Moved CorsFilter initialization to SecurityWebAppInitializer.

parent 0c8ebfe2
......@@ -2,5 +2,12 @@ package de.thm.arsnova.connector.config;
import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;
import de.thm.arsnova.connector.web.CorsFilter;
public class SecurityWebAppInitializer extends AbstractSecurityWebApplicationInitializer {
@Override
protected void beforeSpringSecurityFilterChain(javax.servlet.ServletContext servletContext) {
insertFilters(servletContext, new CorsFilter());
}
}
......@@ -5,8 +5,6 @@ import javax.servlet.Filter;
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
import de.thm.arsnova.connector.web.CorsFilter;
public class WebAppInitializer extends
AbstractAnnotationConfigDispatcherServletInitializer {
......@@ -30,7 +28,6 @@ AbstractAnnotationConfigDispatcherServletInitializer {
CharacterEncodingFilter characterEncodingFilter = new CharacterEncodingFilter();
characterEncodingFilter.setEncoding("UTF-8");
CorsFilter corsFilter = new CorsFilter();
return new Filter[] {characterEncodingFilter, corsFilter};
return new Filter[] {characterEncodingFilter};
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment