Skip to content

Instantly share code, notes, and snippets.

@simonkuang
Created October 11, 2023 16:20
Show Gist options
  • Select an option

  • Save simonkuang/1ad202c5cb142c5be03825241a7b71d7 to your computer and use it in GitHub Desktop.

Select an option

Save simonkuang/1ad202c5cb142c5be03825241a7b71d7 to your computer and use it in GitHub Desktop.

Revisions

  1. simonkuang created this gist Oct 11, 2023.
    20 changes: 20 additions & 0 deletions cdn-mirror.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    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';
    }
    }