diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 48fcdcd..17d2395 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -11,6 +11,7 @@ - [内网运行的问题](onlinejudge/guide/intranet_problems.md) - [代码升级说明](onlinejudge/guide/upgrade.md) - [HTTPS相关问题](onlinejudge/guide/https.md) + - [使用CDN](onlinejudge/guide/using_cdn.md) - [常见问题](onlinejudge/faq.md) - [交流群](onlinejudge/guide/qq_group.md) - [从旧版迁移](onlinejudge/from_old.md) diff --git a/docs/onlinejudge/guide/using_cdn.md b/docs/onlinejudge/guide/using_cdn.md new file mode 100644 index 0000000..58bddeb --- /dev/null +++ b/docs/onlinejudge/guide/using_cdn.md @@ -0,0 +1,9 @@ +# 使用内容分发网络(CDN) + +OJ目前仅支持对 Javascript 和 CSS 使用 CDN 加速,即 API 和动态加载的组件依然会从源主机请求,配置很简单,只需修改 OnlineJudgeDeploy 下的 `docker-compose.yml` 文件,将`STATIC_CDN_HOST`设置为自己的 CDN 域名: + +```yml + - STATIC_CDN_HOST=cdn.oj.com +``` + +保存并运行 `docker-compose up -d`即可。 \ No newline at end of file