|
1 | 1 | <web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
|
2 |
| - <filter> |
3 |
| - <filter-name>CorsFilter</filter-name> |
4 |
| - <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> |
5 |
| - <init-param> |
6 |
| - <param-name>cors.allowed.headers</param-name> |
7 |
| - <param-value>Accept,Accept-Encoding,Accept-Language,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization,Connection,Content-Type,Host,Origin,Referer,Token-Id,User-Agent, X-Requested-With</param-value> |
8 |
| - </init-param> |
9 |
| - <init-param> |
10 |
| - <param-name>cors.allowed.origins</param-name> |
11 |
| - <param-value>*</param-value> |
12 |
| - </init-param> |
13 |
| - <init-param> |
14 |
| - <param-name>cors.allowed.methods</param-name> |
15 |
| - <param-value>GET, POST, PUT, DELETE, OPTIONS, HEAD</param-value> |
16 |
| - </init-param> |
17 |
| - <init-param> |
18 |
| - <param-name>cors.support.credentials</param-name> |
19 |
| - <param-value>true</param-value> |
20 |
| - </init-param> |
21 |
| - </filter> |
22 |
| - <filter-mapping> |
23 |
| - <filter-name>CorsFilter</filter-name> |
24 |
| - <url-pattern>/rest/*</url-pattern> |
25 |
| - </filter-mapping> |
| 2 | + <filter> |
| 3 | + <filter-name>CorsFilter</filter-name> |
| 4 | + <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> |
| 5 | + <init-param> |
| 6 | + <param-name>cors.allowed.headers</param-name> |
| 7 | + <param-value> |
| 8 | + Accept,Accept-Encoding,Accept-Language,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization,Connection,Content-Type,Host,Origin,Referer,Token-Id,User-Agent, |
| 9 | + X-Requested-With |
| 10 | + </param-value> |
| 11 | + </init-param> |
| 12 | + <init-param> |
| 13 | + <param-name>cors.allowed.origins</param-name> |
| 14 | + <param-value>*</param-value> |
| 15 | + </init-param> |
| 16 | + <init-param> |
| 17 | + <param-name>cors.allowed.methods</param-name> |
| 18 | + <param-value>GET, POST, PUT, DELETE, OPTIONS, HEAD</param-value> |
| 19 | + </init-param> |
| 20 | + <init-param> |
| 21 | + <param-name>cors.support.credentials</param-name> |
| 22 | + <param-value>true</param-value> |
| 23 | + </init-param> |
| 24 | + </filter> |
| 25 | + <filter-mapping> |
| 26 | + <filter-name>CorsFilter</filter-name> |
| 27 | + <url-pattern>/*</url-pattern> |
| 28 | + </filter-mapping> |
26 | 29 |
|
27 |
| - <security-constraint> |
28 |
| - <web-resource-collection> |
29 |
| - <web-resource-name>whole_app</web-resource-name> |
30 |
| - <url-pattern>/*</url-pattern> |
31 |
| - <http-method>GET</http-method> |
32 |
| - <http-method>POST</http-method> |
33 |
| - <http-method>PUT</http-method> |
34 |
| - <http-method>DELETE</http-method> |
35 |
| - </web-resource-collection> |
36 |
| - <auth-constraint> |
37 |
| - <role-name>adminRole</role-name> |
38 |
| - </auth-constraint> |
39 |
| - <user-data-constraint> |
40 |
| - <transport-guarantee>CONFIDENTIAL</transport-guarantee> |
41 |
| - </user-data-constraint> |
42 |
| - </security-constraint> |
43 |
| - <login-config> |
44 |
| - <auth-method>BASIC</auth-method> |
45 |
| - </login-config> |
46 |
| - <security-role> |
47 |
| - <role-name>adminRole</role-name> |
48 |
| - </security-role> |
| 30 | + <security-constraint> |
| 31 | + <web-resource-collection> |
| 32 | + <web-resource-name>restAdding</web-resource-name> |
| 33 | + <url-pattern>/rest/papers/*</url-pattern> |
| 34 | + <http-method>GET</http-method> |
| 35 | + <http-method>POST</http-method> |
| 36 | + </web-resource-collection> |
| 37 | + </security-constraint> |
| 38 | + |
| 39 | + <security-constraint> |
| 40 | + <web-resource-collection> |
| 41 | + <web-resource-name>restJournalsTaking</web-resource-name> |
| 42 | + <url-pattern>/rest/journals/*</url-pattern> |
| 43 | + <http-method>GET</http-method> |
| 44 | + </web-resource-collection> |
| 45 | + </security-constraint> |
| 46 | + |
| 47 | + <security-constraint> |
| 48 | + <web-resource-collection> |
| 49 | + <web-resource-name>angular</web-resource-name> |
| 50 | + <url-pattern>/adding.html/*</url-pattern> |
| 51 | + <url-pattern>/bower_components/*</url-pattern> |
| 52 | + <url-pattern>/scripts/*</url-pattern> |
| 53 | + <url-pattern>/views/papers/*</url-pattern> |
| 54 | + <url-pattern>/styles/*</url-pattern> |
| 55 | + </web-resource-collection> |
| 56 | + </security-constraint> |
| 57 | + |
| 58 | + <security-constraint> |
| 59 | + <web-resource-collection> |
| 60 | + <web-resource-name>whole_app</web-resource-name> |
| 61 | + <url-pattern>/*</url-pattern> |
| 62 | + <http-method>GET</http-method> |
| 63 | + <http-method>POST</http-method> |
| 64 | + <http-method>PUT</http-method> |
| 65 | + <http-method>DELETE</http-method> |
| 66 | + </web-resource-collection> |
| 67 | + <auth-constraint> |
| 68 | + <role-name>adminRole</role-name> |
| 69 | + </auth-constraint> |
| 70 | + <user-data-constraint> |
| 71 | + <transport-guarantee>CONFIDENTIAL</transport-guarantee> |
| 72 | + </user-data-constraint> |
| 73 | + </security-constraint> |
| 74 | + <login-config> |
| 75 | + <auth-method>BASIC</auth-method> |
| 76 | + </login-config> |
| 77 | + <security-role> |
| 78 | + <role-name>adminRole</role-name> |
| 79 | + </security-role> |
49 | 80 | </web-app>
|
0 commit comments