Commit 28dcf92d1e4082a7df845685b2e5f9380a64f1b9
1 parent
09d03ddba1
Exists in
master
and in
8 other branches
还原配置文件
Showing 3 changed files with 49 additions and 178 deletions
platform-operate-api/src/main/webapp/WEB-INF/web.xml
View file @
28dcf92
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor | |
3 | - license agreements. See the NOTICE file distributed with this work for additional | |
4 | - information regarding copyright ownership. The ASF licenses this file to | |
5 | - you under the Apache License, Version 2.0 (the "License"); you may not use | |
6 | - this file except in compliance with the License. You may obtain a copy of | |
7 | - the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required | |
8 | - by applicable law or agreed to in writing, software distributed under the | |
9 | - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | |
10 | - OF ANY KIND, either express or implied. See the License for the specific | |
2 | +<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor | |
3 | + license agreements. See the NOTICE file distributed with this work for additional | |
4 | + information regarding copyright ownership. The ASF licenses this file to | |
5 | + you under the Apache License, Version 2.0 (the "License"); you may not use | |
6 | + this file except in compliance with the License. You may obtain a copy of | |
7 | + the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required | |
8 | + by applicable law or agreed to in writing, software distributed under the | |
9 | + License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | |
10 | + OF ANY KIND, either express or implied. See the License for the specific | |
11 | 11 | language governing permissions and limitations under the License. --> |
12 | 12 | <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
13 | - version="2.5" | |
14 | - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> | |
13 | + version="2.5" | |
14 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> | |
15 | 15 | |
16 | + <!-- | |
17 | + <filter> | |
18 | + <filter-name>CorsFilter</filter-name> | |
19 | + <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> | |
20 | + <init-param> | |
21 | + <param-name>cors.allowed.origins</param-name> | |
22 | + <param-value>*</param-value> | |
23 | + </init-param> | |
24 | + <init-param> | |
25 | + <param-name>cors.allowed.methods</param-name> | |
26 | + <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value> | |
27 | + </init-param> | |
28 | + <init-param> | |
29 | + <param-name>cors.allowed.headers</param-name> | |
30 | + <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,authorization</param-value> | |
31 | + </init-param> | |
32 | + <init-param> | |
33 | + <param-name>cors.exposed.headers</param-name> | |
34 | + <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value> | |
35 | + </init-param> | |
36 | + <init-param> | |
37 | + <param-name>cors.support.credentials</param-name> | |
38 | + <param-value>true</param-value> | |
39 | + </init-param> | |
40 | + <init-param> | |
41 | + <param-name>cors.preflight.maxage</param-name> | |
42 | + <param-value>10</param-value> | |
43 | + </init-param> | |
44 | + </filter> | |
45 | + <filter-mapping> | |
46 | + <filter-name>CorsFilter</filter-name> | |
47 | + <url-pattern>/*</url-pattern> | |
48 | + </filter-mapping> | |
16 | 49 | |
17 | -<filter> | |
18 | - <filter-name>CorsFilter</filter-name> | |
19 | - <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> | |
20 | - <init-param> | |
21 | - <param-name>cors.allowed.origins</param-name> | |
22 | - <param-value>*</param-value> | |
23 | - </init-param> | |
24 | - <init-param> | |
25 | - <param-name>cors.allowed.methods</param-name> | |
26 | - <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value> | |
27 | - </init-param> | |
28 | - <init-param> | |
29 | - <param-name>cors.allowed.headers</param-name> | |
30 | - <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,authorization</param-value> | |
31 | - </init-param> | |
32 | - <init-param> | |
33 | - <param-name>cors.exposed.headers</param-name> | |
34 | - <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value> | |
35 | - </init-param> | |
36 | - <init-param> | |
37 | - <param-name>cors.support.credentials</param-name> | |
38 | - <param-value>true</param-value> | |
39 | - </init-param> | |
40 | - <init-param> | |
41 | - <param-name>cors.preflight.maxage</param-name> | |
42 | - <param-value>10</param-value> | |
43 | - </init-param> | |
44 | -</filter> | |
45 | -<filter-mapping> | |
46 | - <filter-name>CorsFilter</filter-name> | |
47 | - <url-pattern>/*</url-pattern> | |
48 | -</filter-mapping> | |
49 | - | |
50 | - | |
51 | -<servlet-mapping> | |
52 | - <servlet-name>default</servlet-name> | |
53 | - <url-pattern>*.xml</url-pattern> | |
54 | - </servlet-mapping> | |
50 | + --> | |
51 | + <servlet-mapping> | |
52 | + <servlet-name>default</servlet-name> | |
53 | + <url-pattern>*.xml</url-pattern> | |
54 | + </servlet-mapping> | |
55 | 55 | |
56 | 56 | |
57 | 57 |
platform-operate-api/src/main/webapp/WEB-INF/web.xml_
View file @
28dcf92
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor | |
3 | - license agreements. See the NOTICE file distributed with this work for additional | |
4 | - information regarding copyright ownership. The ASF licenses this file to | |
5 | - you under the Apache License, Version 2.0 (the "License"); you may not use | |
6 | - this file except in compliance with the License. You may obtain a copy of | |
7 | - the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required | |
8 | - by applicable law or agreed to in writing, software distributed under the | |
9 | - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | |
10 | - OF ANY KIND, either express or implied. See the License for the specific | |
11 | - language governing permissions and limitations under the License. --> | |
12 | -<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
13 | - version="2.5" | |
14 | - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> | |
15 | - | |
16 | -<!-- | |
17 | -<filter> | |
18 | - <filter-name>CorsFilter</filter-name> | |
19 | - <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> | |
20 | - <init-param> | |
21 | - <param-name>cors.allowed.origins</param-name> | |
22 | - <param-value>*</param-value> | |
23 | - </init-param> | |
24 | - <init-param> | |
25 | - <param-name>cors.allowed.methods</param-name> | |
26 | - <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value> | |
27 | - </init-param> | |
28 | - <init-param> | |
29 | - <param-name>cors.allowed.headers</param-name> | |
30 | - <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,authorization</param-value> | |
31 | - </init-param> | |
32 | - <init-param> | |
33 | - <param-name>cors.exposed.headers</param-name> | |
34 | - <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value> | |
35 | - </init-param> | |
36 | - <init-param> | |
37 | - <param-name>cors.support.credentials</param-name> | |
38 | - <param-value>true</param-value> | |
39 | - </init-param> | |
40 | - <init-param> | |
41 | - <param-name>cors.preflight.maxage</param-name> | |
42 | - <param-value>10</param-value> | |
43 | - </init-param> | |
44 | -</filter> | |
45 | -<filter-mapping> | |
46 | - <filter-name>CorsFilter</filter-name> | |
47 | - <url-pattern>/*</url-pattern> | |
48 | -</filter-mapping> | |
49 | - | |
50 | - --> | |
51 | -<servlet-mapping> | |
52 | - <servlet-name>default</servlet-name> | |
53 | - <url-pattern>*.xml</url-pattern> | |
54 | - </servlet-mapping> | |
55 | - | |
56 | - | |
57 | - | |
58 | - <context-param> | |
59 | - <param-name>contextConfigLocation</param-name> | |
60 | - <param-value> | |
61 | - classpath*:/spring/applicationContext.xml | |
62 | - </param-value> | |
63 | - </context-param> | |
64 | - | |
65 | - <session-config> | |
66 | - <session-timeout>60</session-timeout> | |
67 | - </session-config> | |
68 | - <context-param> | |
69 | - <param-name>log4jConfigLocation</param-name> | |
70 | - <param-value>classpath:log4j_config.xml</param-value> | |
71 | - </context-param> | |
72 | - <context-param> | |
73 | - <param-name>log4jRefreshInterval</param-name> | |
74 | - <param-value>60000</param-value> | |
75 | - </context-param> | |
76 | - <servlet> | |
77 | - <servlet-name>dispatcher</servlet-name> | |
78 | - <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> | |
79 | - <init-param> | |
80 | - <param-name>contextConfigLocation</param-name> | |
81 | - <param-value>classpath*:/spring/applicationContext-mvc.xml</param-value> | |
82 | - </init-param> | |
83 | - <load-on-startup>1</load-on-startup> | |
84 | - </servlet> | |
85 | - <servlet-mapping> | |
86 | - <servlet-name>dispatcher</servlet-name> | |
87 | - <url-pattern>/</url-pattern> | |
88 | - </servlet-mapping> | |
89 | - <filter> | |
90 | - <filter-name>HttpMethodFilter</filter-name> | |
91 | - <filter-class>org.springframework.web.filter.HttpPutFormContentFilter</filter-class> | |
92 | - </filter> | |
93 | - <filter-mapping> | |
94 | - <filter-name>HttpMethodFilter</filter-name> | |
95 | - <url-pattern>/*</url-pattern> | |
96 | - </filter-mapping> | |
97 | - <filter> | |
98 | - <filter-name>encodingFilter</filter-name> | |
99 | - <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> | |
100 | - <init-param> | |
101 | - <param-name>encoding</param-name> | |
102 | - <param-value>UTF-8</param-value> | |
103 | - </init-param> | |
104 | - </filter> | |
105 | - | |
106 | - <filter-mapping> | |
107 | - <filter-name>encodingFilter</filter-name> | |
108 | - <url-pattern>/*</url-pattern> | |
109 | - </filter-mapping> | |
110 | - <listener> | |
111 | - <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> | |
112 | - </listener> | |
113 | - <listener> | |
114 | - <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> | |
115 | - </listener> | |
116 | -</web-app> |
platform-operate-api/src/main/webapp/clientaccesspolicy.xml
View file @
28dcf92
1 | - <?xml version="1.0" encoding="utf-8" ?> | |
2 | - <access-policy> | |
3 | - <cross-domain-access> | |
4 | - <policy> | |
5 | - <allow-from http-request-headers="*"> | |
6 | - <domain uri="*"/> | |
7 | - </allow-from> | |
8 | - <grant-to> | |
9 | - <resource path="/" include-subpaths="true"/> | |
10 | - </grant-to> | |
11 | - </policy> | |
12 | - </cross-domain-access> | |
13 | - </access-policy> |