Skip to content

Instantly share code, notes, and snippets.

@ozcl
Last active May 9, 2020 17:23
Show Gist options
  • Save ozcl/84898ca92e0dff6edbd00b9b59dbe254 to your computer and use it in GitHub Desktop.
Save ozcl/84898ca92e0dff6edbd00b9b59dbe254 to your computer and use it in GitHub Desktop.
HTTP 451 on Certain Github Repository if Accessed from Mainland China

Outside Mainland China

$ curl -I https://github.com/programthink/zhao/issues/38
HTTP/1.1 200 OK
Server: GitHub.com
Date: Mon, 22 Jan 2018 04:17:56 GMT
Content-Type: text/html; charset=utf-8
Status: 200 OK
Cache-Control: no-cache
Vary: X-PJAX,Accept
X-UA-Compatible: IE=Edge,chrome=1
Set-Cookie: logged_in=no; domain=.github.com; path=/; expires=Fri, 22 Jan 2038 04:17:56 -0000; secure; HttpOnly
Set-Cookie: _gh_sess=eyJzZXNzaW9uX2lkIjoiMmMxZjgzNDEzM2E0MDNkOTcyOTNjZGU4YTVkYWFkOWMiLCJsYXN0X3JlYWRfZnJvbV9yZXBsaWNhcyI6MTUxNjU5NDY3NjMyMSwic3B5X3JlcG8iOiJwcm9ncmFtdGhpbmsvemhhbyIsInNweV9yZXBvX2F0IjoxNTE2NTk0NjczLCJfY3NyZl90b2tlbiI6InpEbWxzRUN2YjRtaHJIQktoOS85TXkvK1duU0kyNmdGYU01eGpYdzVJOFU9In0%3D--e6ee270a90a6c6c1eb0d5b7ae016512189914030; path=/; secure; HttpOnly
X-Request-Id: 2b35b82c53f044029cb4ee9442b04536
X-Runtime: 3.238857
Expect-CT: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
Content-Security-Policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; child-src render.githubusercontent.com; connect-src 'self' uploads.github.com status.github.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com wss://live.github.com; font-src assets-cdn.github.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; img-src 'self' data: assets-cdn.github.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; media-src 'none'; script-src assets-cdn.github.com; style-src 'unsafe-inline' assets-cdn.github.com
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block
X-Runtime-rack: 3.246430
X-GitHub-Request-Id: F641:5500:50192CA:7B129D8:5A6565F0

Inside Mainland China

$ curl -I https://github.com/programthink/zhao/issues/38
HTTP/1.1 451
Date: Mon, 22 Jan 2018 04:18:47 GMT
Content-Type: text/html; charset=utf-8
Server: GitHub.com
Status: 451
Cache-Control: no-cache
Vary: X-PJAX
X-UA-Compatible: IE=Edge,chrome=1
Set-Cookie: _gh_sess=eyJzZXNzaW9uX2lkIjoiZWEzYThiYmJhODdiZDY1ODg4YmFlYTc1MzVlMzE3ZTQiLCJsYXN0X3JlYWRfZnJvbV9yZXBsaWNhcyI6MTUxNjU5NDcyNzI1MSwic3B5X3JlcG8iOiJwcm9ncmFtdGhpbmsvemhhbyIsInNweV9yZXBvX2F0IjoxNTE2NTk0NzI3LCJfY3NyZl90b2tlbiI6ImhTNld4S092dFJwV2oxQzJxRnVkU3RTU2ZYZnhtVU1tM1RCRE92OUNNTms9In0%3D--73a0fc4adb99b0a0880c5fd4f0978b30ab40333c; path=/; secure; HttpOnly
X-Request-Id: 4051e21a2f76143e6092e967ddfee9ca
X-Runtime: 0.050599
Expect-CT: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
Content-Security-Policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; child-src render.githubusercontent.com; connect-src 'self' uploads.github.com status.github.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com wss://live.github.com; font-src assets-cdn.github.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; img-src 'self' data: assets-cdn.github.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; media-src 'none'; script-src assets-cdn.github.com; style-src 'unsafe-inline' assets-cdn.github.com
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block
X-Runtime-rack: 0.057605
X-GitHub-Request-Id: A569:1F02D:1941137:24DFDE3:5A656626

On Wikipedia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment