diff --git a/src/main/java/de/thm/arsnova/web/CorsFilter.java b/src/main/java/de/thm/arsnova/web/CorsFilter.java deleted file mode 100644 index fc2e55f393103ae8fbbb6d17df6a05f4fa61af12..0000000000000000000000000000000000000000 --- a/src/main/java/de/thm/arsnova/web/CorsFilter.java +++ /dev/null @@ -1,29 +0,0 @@ -package de.thm.arsnova.web; - -import java.io.IOException; - -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.stereotype.Component; -import org.springframework.web.filter.OncePerRequestFilter; - -@Component -public class CorsFilter extends OncePerRequestFilter { - - @Override - protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) - throws ServletException, IOException { - response.addHeader("Access-Control-Allow-Credentials", "true"); - response.addHeader("Access-Control-Allow-Methods", "GET"); - response.addHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, X-Requested-With"); - - if (request.getHeader("origin") != null) { - response.addHeader("Access-Control-Allow-Origin", request.getHeader("origin")); - } - - filterChain.doFilter(request, response); - } -} diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 9c71a5a4a2233deb0bc848ee71fd5aa8356532dc..073123ba956445654d67530a1e90f06839562490 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -61,16 +61,6 @@ <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class> </listener> - <filter> - <filter-name>corsFilter</filter-name> - <filter-class>de.thm.arsnova.web.CorsFilter</filter-class> - <async-supported>true</async-supported> - </filter> - <filter-mapping> - <filter-name>corsFilter</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - <mime-mapping> <extension>manifest</extension> <mime-type>text/cache-manifest</mime-type>