-
Notifications
You must be signed in to change notification settings - Fork 5
/
web-api-local.xml
74 lines (68 loc) · 2.96 KB
/
web-api-local.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="UTF-8"?>
<!-- API CONFIG -->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:web="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
<init-param>
<param-name>allowedMethods</param-name>
<param-value>GET,POST,DELETE,PUT,HEAD</param-value>
</init-param>
<init-param>
<param-name>allowedOrigins</param-name>
<param-value>(https://*.(isaacphysics|adacomputerscience|isaacscience).org|http://localhost:[0-9]+)</param-value>
</init-param>
<init-param>
<param-name>exposedHeaders</param-name>
<param-value>X-Session-Expires</param-value>
</init-param>
<init-param>
<param-name>chainPreflight</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>cross-origin</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>Isaac</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
<init-param>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>uk.ac.cam.cl.dtg.isaac.configuration.IsaacApplicationRegister</param-value>
</init-param>
<init-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/api</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Isaac</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
<listener>
<listener-class>uk.ac.cam.cl.dtg.segue.api.managers.SegueContextNotifier</listener-class>
</listener>
<context-param>
<param-name>resteasy.providers</param-name>
<param-value>
uk.ac.cam.cl.dtg.isaac.configuration.exceptionMappers.UnhandledExceptionMapper,
uk.ac.cam.cl.dtg.isaac.configuration.exceptionMappers.MethodNotAllowedExceptionMapper,
uk.ac.cam.cl.dtg.segue.configuration.exceptionMappers.JacksonInvalidFormatExceptionMapper,
org.jboss.resteasy.plugins.interceptors.GZIPEncodingInterceptor
</param-value>
</context-param>
<context-param>
<param-name>org.eclipse.jetty.servlet.Default.dirAllowed</param-name>
<param-value>false</param-value>
</context-param>
<session-config>
<cookie-config>
<comment>__SAME_SITE_STRICT__</comment>
<http-only>true</http-only>
<secure>true</secure>
</cookie-config>
</session-config>
</web-app>