-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
46 lines (39 loc) · 1.33 KB
/
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
env APP_ID;
env APP_SECRET;
env DOMAIN;
env JWT_SECRET;
user nobody;
worker_processes auto;
error_log /dev/stderr;
pid /usr/lib/nginx/nginx.pid;
events {
worker_connections 102400;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80 default_server;
server_name _;
access_log /dev/stdout;
resolver 127.0.0.11 ipv6=off;
access_by_lua_block {
local feishu_auth = require "resty.feishu_auth"
feishu_auth.app_id = os.getenv("APP_ID")
feishu_auth.app_secret = os.getenv("APP_SECRET")
feishu_auth.callback_uri = "/feishu_auth_callback"
feishu_auth.logout_uri = "/feishu_auth_logout"
feishu_auth.app_domain = os.getenv("DOMAIN")
feishu_auth.jwt_secret = os.getenv("JWT_SECRET") or "thisisjwtsecret";
-- feishu_auth.ip_blacklist = {""}
-- feishu_auth.uri_whitelist = {"/"}
-- feishu_auth.department_whitelist = {"0"}
feishu_auth:auth()
}
location / {
proxy_pass http://127.0.0.1:3000;
}
}
}