差分発生行の前後
無視リスト:
更新日時:
2014/11/11 14:23:58 (10 年 前)
更新者:
atsuko
ログメッセージ:

他サイトから利用することを想定してHTTPヘッダ追加

パス:
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www
ファイル:
4 変更

凡例:

変更なし
追加
削除
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/CLServlet.java

    r197 r204  
    6969        //processRequest(request, response); 
    7070        response.setContentType("application/json;charset=UTF-8"); 
     71        response.setHeader("Access-Control-Allow-Origin", "*"); 
     72        response.setHeader("Access-Control-Allow-Methods", "GET"); 
     73        response.setHeader("Access-Control-Allow-Headers", request.getHeader("Access-Control-Request-Headers")); 
     74        response.setHeader("Access-Control-Max-Age", "-1");      
    7175        PrintWriter out = response.getWriter(); 
    7276        String ep = request.getParameter("ep"); 
     
    7478        QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg"); 
    7579        if ( qpg == null ){ 
    76         //QueryPathGenerator  
    7780                   qpg = new QueryPathGenerator(); 
    7881        } 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/EPServlet.java

    r175 r204  
    7272         
    7373        response.setContentType("application/json;charset=UTF-8"); 
     74        response.setHeader("Access-Control-Allow-Origin", "*"); 
     75        response.setHeader("Access-Control-Allow-Methods", "GET"); 
     76        response.setHeader("Access-Control-Allow-Headers", request.getHeader("Access-Control-Request-Headers")); 
     77        response.setHeader("Access-Control-Max-Age", "-1");         
    7478        PrintWriter out = response.getWriter(); 
    7579        if ( qpg == null ){ 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/PLServlet.java

    r175 r204  
    6666        //processRequest(request, response); 
    6767        response.setContentType("application/json;charset=UTF-8"); 
     68        response.setHeader("Access-Control-Allow-Origin", "*"); 
     69        response.setHeader("Access-Control-Allow-Methods", "GET"); 
     70        response.setHeader("Access-Control-Allow-Headers", request.getHeader("Access-Control-Request-Headers")); 
     71        response.setHeader("Access-Control-Max-Age", "-1"); 
    6872        PrintWriter out = response.getWriter(); 
    6973        String ep = request.getParameter("ep"); 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/SPServlet.java

    r193 r204  
    7878        //processRequest(request, response); 
    7979        response.setContentType("application/json;charset=UTF-8"); 
    80         PrintWriter out = response.getWriter(); 
     80        response.setHeader("Access-Control-Allow-Origin", "*"); 
     81        response.setHeader("Access-Control-Allow-Methods", "GET"); 
     82        response.setHeader("Access-Control-Allow-Headers", request.getHeader("Access-Control-Request-Headers")); 
     83        response.setHeader("Access-Control-Max-Age", "-1"); 
     84        PrintWriter out = response.getWriter(); 
    8185        String jpath = request.getParameter("jsonpath"); 
    8286        Path path = null;