Skip to content

Commit

Permalink
[GEOS-11315] Revert to CORS commented out (geoserver#7450)
Browse files Browse the repository at this point in the history
* [GEOS-11315] Revert to CORS commented out
* [GEOS-11315] Cleanly comment out CORS
---------

Co-authored-by: Jody Garnett <jody.garnett@gmail.com>
  • Loading branch information
turingtestfail and jodygarnett authored Mar 1, 2024
1 parent 87a7332 commit c86b854
Showing 1 changed file with 34 additions and 31 deletions.
65 changes: 34 additions & 31 deletions src/web/app/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<param-value>true</param-value>
</context-param>
-->
<!--
<!--
<context-param>
<param-name>PROXY_BASE_URL</param-name>
<param-value>http://82.58.146.45/geoserver</param-value>
Expand Down Expand Up @@ -138,31 +138,33 @@
-->
</filter>

<!-- Uncomment following filter to enable CORS in Jetty. Do not forget the second config block further down.-->
<!-- Uncomment following filter to enable CORS in Jetty. Do not forget the second config block further down. -->
<!--
<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
<init-param>
<param-name>chainPreflight</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>allowedOrigins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>allowedMethods</param-name>
<param-value>GET,POST,PUT,DELETE,HEAD,OPTIONS</param-value>
</init-param>
<init-param>
<param-name>allowedHeaders</param-name>
<param-value>*</param-value>
</init-param>
</filter>

<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
<init-param>
<param-name>chainPreflight</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>allowedOrigins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>allowedMethods</param-name>
<param-value>GET,POST,PUT,DELETE,HEAD,OPTIONS</param-value>
</init-param>
<init-param>
<param-name>allowedHeaders</param-name>
<param-value>*</param-value>
</init-param>
</filter>
-->

<!-- Uncomment following filter to enable CORS in Tomcat. Do not forget the second config block further down.
<filter>
<!-- Uncomment following filter to enable CORS in Tomcat. Do not forget the second config block further down. -->
<!--
<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
Expand All @@ -177,10 +179,10 @@
<param-name>cors.allowed.headers</param-name>
<param-value>*</param-value>
</init-param>
</filter>
-->
</filter>
-->

<!--
<!--
THIS FILTER MAPPING MUST BE THE FIRST ONE, otherwise we end up with ruined chars in the input from the GUI
See the "Note" in the Tomcat character encoding guide:
http://wiki.apache.org/tomcat/FAQ/CharacterEncoding
Expand All @@ -190,12 +192,13 @@
<url-pattern>/*</url-pattern>
</filter-mapping>

<!-- Uncomment following filter-mapping to enable CORS -->
<!-- Uncomment following filter-mapping to enable CORS -->
<!--
<filter-mapping>
<filter-name>cross-origin</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

-->

<filter-mapping>
<filter-name>FlushSafeFilter</filter-name>
Expand All @@ -217,7 +220,7 @@
<url-pattern>/*</url-pattern>
</filter-mapping>

<!--
<!--
If you want to use your security system comment out this one too
-->
<filter-mapping>
Expand Down Expand Up @@ -271,7 +274,7 @@
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>

<!-- single mapping to spring, this only works properly if the advanced dispatch filter is
<!-- single mapping to spring, this only works properly if the advanced dispatch filter is
active -->
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
Expand Down

0 comments on commit c86b854

Please sign in to comment.