Advertisement
Antevasin

Web.xml progetto TWEB

Dec 4th, 2020
1,042
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.78 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
  3.         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
  5.         version="4.0">
  6.  
  7.     <filter>
  8.         <filter-name>CorsFilter</filter-name>
  9.         <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
  10.         //add below config
  11.         <init-param>
  12.             <param-name>cors.allowed.origins</param-name>
  13.             <param-value>http://localhost:8080</param-value>
  14.         </init-param>
  15.  
  16.     </filter>
  17.  
  18.     <filter-mapping>
  19.         <filter-name>CorsFilter</filter-name>
  20.         <url-pattern>/*</url-pattern>
  21.     </filter-mapping>
  22. </web-app>
  23.  
  24.  
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement