Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit 40ea112

Browse files
committed
Merge pull request #299 from github/update-cors-examples
Update headers in CORS examples
2 parents a6e1773 + 1f75fcd commit 40ea112

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

content/v3.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,16 +442,16 @@ Here's a sample request for a browser hitting [Calendar About Nothing](http://ca
442442

443443
$ curl -i https://api.github.com -H "Origin: http://calendaraboutnothing.com"
444444
HTTP/1.1 302 Found
445-
Access-Control-Allow-Origin: http://calendaraboutnothing.com
445+
Access-Control-Allow-Origin: *
446446
Access-Control-Expose-Headers: ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes
447447
Access-Control-Allow-Credentials: true
448448

449449
This is what the CORS preflight request looks like:
450450

451451
$ curl -i https://api.github.com -H "Origin: http://calendaraboutnothing.com" -X OPTIONS
452452
HTTP/1.1 204 No Content
453-
Access-Control-Allow-Origin: http://calendaraboutnothing.com
454-
Access-Control-Allow-Headers: Authorization, X-Requested-With
453+
Access-Control-Allow-Origin: *
454+
Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With
455455
Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE
456456
Access-Control-Expose-Headers: ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes
457457
Access-Control-Max-Age: 86400

0 commit comments

Comments
 (0)