Skip to content

Commit

Permalink
Merge pull request #81 from w3c/add-cors-headers
Browse files Browse the repository at this point in the history
Add CORS headers for scripted cross-origin access
  • Loading branch information
ylafon committed Oct 22, 2017
2 parents 91c3a0d + c3cc1b2 commit 1d9576a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions org/w3c/css/servlet/CssValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,10 @@ private void buildHeader(ApplContext ac, HttpServletResponse res,
res.setHeader("charset", Utf8Properties.ENCODING);
}
res.setHeader("Vary", "Accept-Language");
res.setHeader("Access-Control-Allow-Origin", "*");
res.setHeader("Access-Control-Allow-Headers", "content-type,accept-charset");
res.setHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, OPTIONS");
res.setHeader("Access-Control-Max-Age", "600");
}

private void handleError(HttpServletResponse res, ApplContext ac,
Expand Down

0 comments on commit 1d9576a

Please sign in to comment.