Changeset 880 for trunk


Ignore:
Timestamp:
10/16/12 08:25:36 (12 years ago)
Author:
pharms
Message:
  • added support for cross site scripting as some browsers prevented sending data to the monitoring server
Location:
trunk/autoquest-htmlmonitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-htmlmonitor/pom.xml

    r879 r880  
    4242        </dependency> 
    4343        <dependency> 
    44             <groupId>org.mortbay.jetty</groupId> 
    45             <artifactId>jetty-sslengine</artifactId> 
    46             <version>6.1.22</version> 
     44            <groupId>org.eclipse.jetty</groupId> 
     45            <artifactId>jetty-servlets</artifactId> 
     46            <version>8.1.7.v20120910</version> 
    4747        </dependency> 
    4848        <dependency> 
  • trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorServer.java

    r879 r880  
    11package de.ugoe.cs.autoquest.htmlmonitor; 
    22 
     3import org.eclipse.jetty.servlets.CrossOriginFilter; 
     4import org.mortbay.jetty.Handler; 
    35import org.mortbay.jetty.Server; 
    46import org.mortbay.jetty.servlet.Context; 
     7import org.mortbay.jetty.servlet.FilterHolder; 
    58import org.mortbay.jetty.servlet.ServletHolder; 
    69 
     
    7881        ServletHolder servletHolder = new ServletHolder(servlet); 
    7982        root.addServlet(servletHolder, "/*"); 
     83         
     84        CrossOriginFilter filter = new CrossOriginFilter(); 
     85        FilterHolder filterHolder = new FilterHolder(filter); 
     86        filterHolder.setInitParameter("allowedOrigins", "*"); 
     87        filterHolder.setInitParameter("allowedMethods", "GET,POST"); 
     88        root.addFilter(filterHolder, "/*", Handler.ALL); 
    8089    } 
    8190 
Note: See TracChangeset for help on using the changeset viewer.