Last active
April 20, 2021 03:00
-
-
Save r1noff/44ca2efa016d77201a0857db92d24e2d to your computer and use it in GitHub Desktop.
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
# Nginx server configuration for host Unity WebGL application | |
# With WebAssemblyStreaming | |
# Works perfectly on Unity 2020.3 | |
server { | |
root ***YOUR SERVER ROOT FOLDER*** | |
index index.html index.htm index.nginx-debian.html; | |
server_name **YOUR SERVER NAME*** | |
autoindex on; | |
autoindex_localtime on; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
location ~* ^.*\.(js)$ { | |
types {} | |
default_type application/javascript; | |
} | |
location ~* ^.*\.(wasm)$ { | |
types {} | |
default_type application/wasm; | |
} | |
location ~* ^.*\.(wasm.gz)$ { | |
gunzip on; | |
gzip off; | |
types {} | |
default_type application/wasm; | |
add_header Content-Encoding gzip; | |
} | |
location ~* ^.*\.(framework.js.gz|js.gz)$ { | |
gunzip on; | |
gzip off; | |
types {} | |
default_type application/javascript; | |
add_header Content-Encoding gzip; | |
} | |
location ~* ^.*\.(data.gz|symbols.json.gz)$ { | |
gunzip on; | |
gzip off; | |
types {} | |
default_type application/octet-stream; | |
add_header Content-Encoding gzip; | |
} | |
location ~* ^.*\.(wasm.br)$ { | |
types {} | |
default_type application/wasm; | |
add_header Content-Encoding br; | |
} | |
location ~* ^.*\.(framework.js.br|js.br)$ { | |
types {} | |
default_type application/javascript; | |
add_header Content-Encoding br; | |
} | |
location ~* ^.*\.(data.br|symbols.json.br)$ { | |
types {} | |
default_type application/octet-stream; | |
add_header Content-Encoding br; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment