Created
October 11, 2023 16:20
-
-
Save simonkuang/1ad202c5cb142c5be03825241a7b71d7 to your computer and use it in GitHub Desktop.
代理 discord cdn 的 openresty 配置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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