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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.