-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
nginx.conf
54 lines (43 loc) · 949 Bytes
/
nginx.conf
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
45
46
47
48
49
50
51
52
53
54
worker_processes ${{NUM_WORKERS}};
error_log stderr notice;
daemon off;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
init_by_lua_block {
require "lpeg"
require "socket"
require "ltn12"
require "mime"
}
server {
listen ${{PORT}};
lua_code_cache ${{CODE_CACHE}};
add_header Cross-Origin-Embedder-Policy require-corp;
add_header Cross-Origin-Opener-Policy same-origin;
location / {
default_type text/html;
content_by_lua '
require("lapis").serve("app")
';
}
location /static/ {
if ($request_filename ~* \.es6$|\.scss$) {
return 403;
}
access_log off;
gzip on;
gzip_types application/x-javascript text/css image/svg+xml;
alias static/;
}
location /sw.js {
alias static/service_worker.js;
}
location /favicon.ico {
alias static/favicon.ico;
}
}
}