@@ -32,9 +32,11 @@ $ curl -i {{ site.data.variables.product.api_url_pre }}/users/octocat/orgs
32
32
> Status: 200 OK
33
33
> ETag: "a00049ba79152d03380c34652f2cb612"
34
34
> X-GitHub-Media-Type: github.v3
35
+ {% if page.version == 'dotcom' %}
35
36
> X-RateLimit-Limit: 5000
36
37
> X-RateLimit-Remaining: 4987
37
38
> X-RateLimit-Reset: 1350085394
39
+ {% endif %}
38
40
> Content-Length: 5
39
41
> Cache-Control: max-age=0, private, must-revalidate
40
42
> X-Content-Type-Options: nosniff
@@ -504,9 +506,11 @@ $ curl -i {{ site.data.variables.product.api_url_pre }}/user
504
506
> Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT
505
507
> Status: 200 OK
506
508
> Vary: Accept, Authorization, Cookie
509
+ {% if page.version == 'dotcom' %}
507
510
> X-RateLimit-Limit: 5000
508
511
> X-RateLimit-Remaining: 4996
509
512
> X-RateLimit-Reset: 1372700873
513
+ {% endif %}
510
514
511
515
$ curl -i {{ site.data.variables.product.api_url_pre }}/user -H 'If-None-Match: "644b5b0155e6404a9cc4bd9d8b1ae730"'
512
516
> HTTP/1.1 304 Not Modified
@@ -515,19 +519,23 @@ $ curl -i {{ site.data.variables.product.api_url_pre }}/user -H 'If-None-Match:
515
519
> Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT
516
520
> Status: 304 Not Modified
517
521
> Vary: Accept, Authorization, Cookie
522
+ {% if page.version == 'dotcom' %}
518
523
> X-RateLimit-Limit: 5000
519
524
> X-RateLimit-Remaining: 4996
520
525
> X-RateLimit-Reset: 1372700873
526
+ {% endif %}
521
527
522
528
$ curl -i {{ site.data.variables.product.api_url_pre }}/user -H "If-Modified-Since: Thu, 05 Jul 2012 15:31:30 GMT"
523
529
> HTTP/1.1 304 Not Modified
524
530
> Cache-Control: private, max-age=60
525
531
> Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT
526
532
> Status: 304 Not Modified
527
533
> Vary: Accept, Authorization, Cookie
534
+ {% if page.version == 'dotcom' %}
528
535
> X-RateLimit-Limit: 5000
529
536
> X-RateLimit-Remaining: 4996
530
537
> X-RateLimit-Reset: 1372700873
538
+ {% endif %}
531
539
```
532
540
533
541
##Cross Origin Resource Sharing
@@ -545,7 +553,7 @@ Here's a sample request sent from a browser hitting
545
553
$ curl -i {{ site.data.variables.product.api_url_pre }} -H "Origin: http://example.com"
546
554
HTTP/1.1 302 Found
547
555
Access-Control-Allow-Origin: *
548
- Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
556
+ Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP,{% if page.version == 'dotcom' %} X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,{% endif %} X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
549
557
Access-Control-Allow-Credentials: true
550
558
```
551
559
@@ -557,7 +565,7 @@ HTTP/1.1 204 No Content
557
565
Access-Control-Allow-Origin: *
558
566
Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-GitHub-OTP, X-Requested-With
559
567
Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE
560
- Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
568
+ Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP,{% if page.version == 'dotcom' %} X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,{% endif %} X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
561
569
Access-Control-Max-Age: 86400
562
570
Access-Control-Allow-Credentials: true
563
571
```
@@ -576,9 +584,11 @@ $ curl https://api.github.com?callback=foo
576
584
> /**/foo({
577
585
> "meta": {
578
586
> "status": 200,
587
+ {% if page.version == 'dotcom' %}
579
588
> "X-RateLimit-Limit": "5000",
580
589
> "X-RateLimit-Remaining": "4966",
581
590
> "X-RateLimit-Reset": "1372700873",
591
+ {% endif %}
582
592
> "Link": [ // pagination headers and other links
583
593
> ["https://api.github.com?page=2", {"rel": "next"}]
584
594
> ]