Skip to content

Commit

Permalink
use http header with proper case
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Feb 6, 2021
1 parent 81498c2 commit ba6089e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ GHRequest.prototype.doRequest = function (url, callback) {
timeout: 30000,
url: url,
beforeSend: function(request) {
request.setRequestHeader("gh-client", "web-ui 3.0")
request.setRequestHeader("GH-Client", "web-ui 3.0")
},
success: function (json) {
if (json.paths) {
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/java/com/graphhopper/http/CORSFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
HttpServletResponse rsp = (HttpServletResponse) response;
rsp.setHeader("Access-Control-Allow-Methods", "GET, POST, HEAD, OPTIONS");
rsp.setHeader("Access-Control-Allow-Headers", "Origin,Accept,X-Requested-With,"
+ "Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Range,gh-client");
+ "Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Range,GH-Client");
rsp.setHeader("Access-Control-Allow-Origin", "*");

chain.doFilter(request, response);
Expand Down

0 comments on commit ba6089e

Please sign in to comment.