10 #------------------------------------------------
11 # Adds required support for Godot 4 WebGL Support
12 #------------------------------------------------
14 add_header Cross-Origin-Resource-Policy same-origin;
15 add_header Cross-Origin-Opener-Policy same-origin;
16 add_header Cross-Origin-Embedder-Policy require-corp;
19 #----------------------------------
21 #----------------------------------
23 # On-disk Brotli-precompressed data files should be served with compression enabled:
24 location ~ .+\.(data|symbols\.json)\.br$ {
25 # Because this file is already pre-compressed on disk, disable the on-demand compression on it.
26 # Otherwise nginx would attempt double compression.
28 add_header Content-Encoding br;
29 default_type application/octet-stream;
32 # On-disk Brotli-precompressed JavaScript code files:
33 location ~ .+\.js\.br$ {
34 gzip off; # Do not attempt dynamic gzip compression on an already compressed file
35 add_header Content-Encoding br;
36 default_type application/javascript;
39 # On-disk Brotli-precompressed WebAssembly files:
40 location ~ .+\.wasm\.br$ {
41 gzip off; # Do not attempt dynamic gzip compression on an already compressed file
42 add_header Content-Encoding br;
43 # Enable streaming WebAssembly compilation by specifying the correct MIME type for
45 default_type application/wasm;
48 # On-disk gzip-precompressed data files should be served with compression enabled:
49 location ~ .+\.(data|symbols\.json)\.gz$ {
50 gzip off; # Do not attempt dynamic gzip compression on an already compressed file
51 add_header Content-Encoding gzip;
52 default_type application/octet-stream;
55 # On-disk gzip-precompressed JavaScript code files:
56 location ~ .+\.js\.gz$ {
57 gzip off; # Do not attempt dynamic gzip compression on an already compressed file
58 add_header Content-Encoding gzip;
59 default_type application/javascript;
62 # On-disk gzip-precompressed WebAssembly files:
63 location ~ .+\.wasm\.gz$ {
64 gzip off; # Do not attempt dynamic gzip compression on an already compressed file
65 add_header Content-Encoding gzip;
66 # Enable streaming WebAssembly compilation by specifying the correct MIME type for
68 default_type application/wasm;