-
Notifications
You must be signed in to change notification settings - Fork 54
/
.htaccess
44 lines (36 loc) · 1.08 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Unity WebGL Configuration for Unity 2020+ for LiteSpeed Web Servers (LSWS)
# From https://github.com/JohannesDeml/UnityWebGL-LoadingTest
# For nginx or apache take a look at https://docs.unity3d.com/Manual/webgl-server-configuration-code-samples.html
# Supports Brotli and no Compression, Gzip seems to have a problem.
Header set Content-Security-Policy "worker-src 'self' blob:;"
<IfModule mod_mime.c>
# No compression
AddType application/wasm .wasm
AddOutputFilterByType DEFLATE application/wasm
# Gzip support
<Files *.js.gz>
AddType "text/javascript" .gz
AddEncoding gzip .gz
</Files>
<Files *.wasm.gz>
AddType "application/wasm" .gz
AddEncoding gzip .gz
</Files>
<Files *.data.gz>
AddType "application/octet-stream" .gz
AddEncoding gzip .gz
</Files>
# brotli support
<Files *.js.br>
AddType "text/javascript" .br
AddEncoding br .br
</Files>
<Files *.wasm.br>
AddType "application/wasm" .br
AddEncoding br .br
</Files>
<Files *.data.br>
AddType "application/octet-stream" .br
AddEncoding br .br
</Files>
</IfModule>