{"id":15415061,"url":"https://github.com/sukkaw/disqusjs-proxy-example","last_synced_at":"2026-01-07T16:03:34.660Z","repository":{"id":96342002,"uuid":"166158382","full_name":"SukkaW/disqusjs-proxy-example","owner":"SukkaW","description":"Using Now as Disqus API Proxy","archived":false,"fork":false,"pushed_at":"2020-01-02T14:36:21.000Z","size":2,"stargazers_count":13,"open_issues_count":0,"forks_count":46,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T22:18:44.245Z","etag":null,"topics":["disqus","disqus-api","disqus-proxy","disqusjs","now","zeit-now"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SukkaW.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-17T04:09:11.000Z","updated_at":"2022-09-14T04:35:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"db1983ad-e46a-490d-a67e-19f6528105cb","html_url":"https://github.com/SukkaW/disqusjs-proxy-example","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"6b28f2d66cd2c1f1c8d7eda93deccc1a2998f015"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SukkaW%2Fdisqusjs-proxy-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SukkaW%2Fdisqusjs-proxy-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SukkaW%2Fdisqusjs-proxy-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SukkaW%2Fdisqusjs-proxy-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SukkaW","download_url":"https://codeload.github.com/SukkaW/disqusjs-proxy-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245960837,"owners_count":20700783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["disqus","disqus-api","disqus-proxy","disqusjs","now","zeit-now"],"created_at":"2024-10-01T17:05:48.611Z","updated_at":"2026-01-07T16:03:29.639Z","avatar_url":"https://github.com/SukkaW.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# disqusjs-proxy-example\n\n一个使用 [ZEIT Now](https://zeit.co/) 部署 Disqus API Proxy 的示例。\n\n## 简介\n\nZEIT Now 提供 Serverless 部署服务，支持包括静态网页、微服务、Lambda、持续集成等。在这里我们使用 Now 的微服务功能部署一个 Disqus API 的反代。\n\n[DisqusJS](https://github.com/SukkaW/DisqusJS) 中提供的公共 Disqus API 反代就部署在 ZEIT Now 上。\n\n## 使用教程\n\n1. fork 这个 repo\n2. 在 [ZEIT](https://zeit.co/) 上注册账号并绑定 GitHub 账号\n3. 在 [GitHub APP](https://github.com/settings/installations) 中为 Now 设置你 fork 后的 repo 的访问权限\n4. 在你 fork 后的 repo 中修改 `_now.json` 的相关内容\n  - 如果你想要绑定你自己的域名，请将 `_now.json` 中 `[Place Your Domain Here]` 改成你的域名，否则你可以将整个 `alias` 字段删除\n  - 如果不配置自己的域名，你也可以使用 ZEIT 提供的 `now.sh` 子域名\n  - 将 `[Cache Age]` 修改为缓存时长（数字），单位是秒。如果你并不需要设置 `Cache-Control` 响应头，你可以将 `routes.headers` 字段删除\n  - 如果你想要定制其它内容（如添加响应头），请参阅 [ZEIT 的相关文档](https://zeit.co/docs/v2/deployments/configuration/)\n5. 将 `_now.json` 重命名为 `now.json` 并提交 commit\n6. ZEIT 会自动开始部署你的项目，当部署完成后，ZEIT 的 Bot 会在你的 commit 中添加一条评论提示部署结果\n7. 如果你绑定了你自己的域名，需要添加一条 `CNAME` 记录指向 `alias.zeit.co`\n8. 测试你的反代是否可以使用：访问你的反代域名，应该会跳转到 Disqus API 文档页面\n  \u003e 因为直接访问 https://disqus.com/api/ 便会跳转到 https://disqus.com/api/docs/ ；反代也会返回 3xx 状态码\n9. 修改你的服务中 Disqus API Endpoint 的配置；如果你正在使用 [DisqusJS](https://github.com/SukkaW/DisqusJS)，这个配置是 DisqusJS 中的 `api` 字段。\n\n## 注意事项\n\n- ZEIT 提供永久免费的 Plan，但是有 100GB 的流量限制\n- ZEIT 实例中的 `now.sh` 域名会使用 Cloudflare 的 Enterprise Plan；但是你绑定的自己的域名只能使用 ZEIT 自有的基础设施，如有必要可以在 Now 实例之外套一层 CDN\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukkaw%2Fdisqusjs-proxy-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsukkaw%2Fdisqusjs-proxy-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukkaw%2Fdisqusjs-proxy-example/lists"}