include::../description.adoc[]

include::../ask-yourself.adoc[]

include::../recommended.adoc[]

== Sensitive Code Example

----
// === Tomcat 7+ Cors Filter ===
<filter>
  <filter-name>CorsFilter</filter-name>
  <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
</filter>
<filter-mapping>
  <filter-name>CorsFilter</filter-name>
  <url-pattern>/*</url-pattern> <!-- Sensitive -->
</filter-mapping>
----

== Compliant Solution

----
// === Tomcat 7+ Cors Filter ===
<filter>
  <filter-name>CorsFilter</filter-name>
  <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
</filter>
<filter-mapping>
  <filter-name>CorsFilter</filter-name>
  <url-pattern>trustedwebsite.com</url-pattern> <!-- Compliant -->
</filter-mapping>
----

include::../see.adoc[]
