1 <?xml version="1.0" encoding="ISO-8859-1"?>
3 ~ Copyright (c) 2016 Cisco and/or its affiliates.
5 ~ Licensed under the Apache License, Version 2.0 (the "License");
6 ~ you may not use this file except in compliance with the License.
7 ~ You may obtain a copy of the License at:
9 ~ http://www.apache.org/licenses/LICENSE-2.0
11 ~ Unless required by applicable law or agreed to in writing, software
12 ~ distributed under the License is distributed on an "AS IS" BASIS,
13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ~ See the License for the specific language governing permissions and
15 ~ limitations under the License.
18 <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
23 <servlet-name>JAXRSRestconf</servlet-name>
24 <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
26 <param-name>javax.ws.rs.Application</param-name>
27 <param-value>org.opendaylight.netconf.sal.rest.impl.RestconfApplication</param-value>
29 <load-on-startup>1</load-on-startup>
32 <!-- FIXME-minimal configure SHIRO -->
33 <!-- FIXME-minimal configure https -->
34 <!--<context-param>-->
35 <!--<param-name>shiroEnvironmentClass</param-name>-->
36 <!--<param-value>org.opendaylight.aaa.shiro.web.env.KarafIniWebEnvironment</param-value>-->
37 <!--</context-param>-->
40 <!--<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>-->
44 <!--<filter-name>ShiroFilter</filter-name>-->
45 <!--<filter-class>org.opendaylight.aaa.shiro.filters.AAAFilter</filter-class>-->
48 <!--<filter-mapping>-->
49 <!--<filter-name>ShiroFilter</filter-name>-->
50 <!--<url-pattern>/*</url-pattern>-->
51 <!--</filter-mapping>-->
54 <servlet-name>JAXRSRestconf</servlet-name>
55 <url-pattern>/*</url-pattern>
59 <filter-name>GzipFilter</filter-name>
60 <filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
62 <param-name>mimeTypes</param-name>
63 <param-value>application/xml,application/yang.data+xml,xml,application/json,application/yang.data+json</param-value>
66 <!-- FIXME gzip filter is deprecated -->
68 <filter-name>GzipFilter</filter-name>
69 <url-pattern>/*</url-pattern>
73 <filter-name>cross-origin-restconf</filter-name>
74 <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
76 <param-name>allowedOrigins</param-name>
77 <param-value>*</param-value>
80 <param-name>allowedMethods</param-name>
81 <param-value>GET,POST,OPTIONS,DELETE,PUT,HEAD</param-value>
84 <param-name>allowedHeaders</param-name>
85 <param-value>origin, content-type, accept, authorization</param-value>
88 <param-name>exposedHeaders</param-name>
89 <param-value>location</param-value>
93 <filter-name>cross-origin-restconf</filter-name>
94 <url-pattern>/*</url-pattern>
98 <web-resource-collection>
99 <web-resource-name>NB api</web-resource-name>
100 <url-pattern>/*</url-pattern>
101 <http-method>POST</http-method>
102 <http-method>GET</http-method>
103 <http-method>PUT</http-method>
104 <http-method>PATCH</http-method>
105 <http-method>DELETE</http-method>
106 <http-method>HEAD</http-method>
107 </web-resource-collection>
108 </security-constraint>