Skip to content

Instantly share code, notes, and snippets.

@simonkuang
Created October 11, 2023 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonkuang/1ad202c5cb142c5be03825241a7b71d7 to your computer and use it in GitHub Desktop.
Save simonkuang/1ad202c5cb142c5be03825241a7b71d7 to your computer and use it in GitHub Desktop.
代理 discord cdn 的 openresty 配置
server {
listen 8080;
resolver 8.8.8.8;
location ~* ^/cdn/discordapp/(.*)$ {
proxy_set_header Host 'cdn.discordapp.com';
proxy_set_header Accept-Encoding $http_accept_encoding;
proxy_pass https://cdn.discordapp.com/$1;
}
location ~* ^/discordapp/cdn/(.*)$ {
proxy_set_header Host 'cdn.discordapp.com';
proxy_set_header Accept-Encoding $http_accept_encoding;
proxy_pass https://cdn.discordapp.com/$1;
}
location / {
echo 'Welcome';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment