source: apps/i2ptunnel/jsp/edit.jsp @ a1afa1c

Last change on this file since a1afa1c was 3685bf0, checked in by zzz <zzz@…>, 9 years ago

add X-Frame-Options to console headers

  • Property mode set to 100644
File size: 891 bytes
Line 
1<%
2    // NOTE: Do the header carefully so there is no whitespace before the <?xml... line
3
4    response.setHeader("X-Frame-Options", "SAMEORIGIN");
5
6%><%@page pageEncoding="UTF-8"
7%><%@page trimDirectiveWhitespaces="true"
8%><%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean"
9%><% 
10String tun = request.getParameter("tunnel");
11 if (tun != null) {
12  try {
13    int curTunnel = Integer.parseInt(tun);
14    if (EditBean.staticIsClient(curTunnel)) {
15        %><jsp:include page="editClient.jsp" /><%
16    } else {
17        %><jsp:include page="editServer.jsp" /><%
18    }
19  } catch (NumberFormatException nfe) {
20    %>Invalid tunnel parameter<%
21  }
22} else {
23  String type = request.getParameter("type");
24  int curTunnel = -1;
25  if (EditBean.isClient(type)) {
26        %><jsp:include page="editClient.jsp" /><%
27  } else {
28        %><jsp:include page="editServer.jsp" /><%
29  }
30}
31%>
Note: See TracBrowser for help on using the repository browser.