public class AjaxProxyServlet extends javax.servlet.http.HttpServlet
Used for Ajax requests that needs to be proxied to avoid XSiteScripting issues.
In order to avoid "open proxiying", only urls configured in the AjaxProxyComponent
via the extension point
"proxyableURL" can be proxied.
Modifier and Type | Field and Description |
---|---|
protected static ReentrantReadWriteLock |
cacheLock |
protected static Map<String,String> |
requestsCache |
protected static AjaxProxyService |
service |
static String |
X_METHOD_HEADER |
Constructor and Description |
---|
AjaxProxyServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected void |
doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected static String |
doRequest(String method,
String targetURL,
javax.servlet.http.HttpServletRequest req) |
protected static AjaxProxyService |
getService() |
protected static String |
getSessionId(javax.servlet.http.HttpServletRequest req) |
protected static void |
handleProxy(String method,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
doDelete, doHead, doOptions, doTrace, getLastModified, service, service
public static final String X_METHOD_HEADER
protected static AjaxProxyService service
protected static Map<String,String> requestsCache
protected static final ReentrantReadWriteLock cacheLock
public AjaxProxyServlet()
protected static AjaxProxyService getService()
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doPut
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected static void handleProxy(String method, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
IOException
protected static String getSessionId(javax.servlet.http.HttpServletRequest req)
protected static String doRequest(String method, String targetURL, javax.servlet.http.HttpServletRequest req) throws IOException
IOException
Copyright © 2017 Nuxeo. All rights reserved.