我想在我的 nginx 上设置 jwt auth 但出现此错误:
nginx: [emerg] unknown directive "auth_jwt" in /usr/local/etc/nginx/nginx.conf
Run Code Online (Sandbox Code Playgroud)
我的 nginx 版本:nginx/1.15.8 操作系统:macOs Mojave v10.14.2
我在谷歌或其他网站上找不到答案。
/nginx.cofnig:
location / {
auth_jwt "closed site" token=$cookie_token;
auth_jwt_key_file conf/api_secret.jwk;
try_files $uri /index.html =404;
}
Run Code Online (Sandbox Code Playgroud)