Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use proxy #1

Open
jiuli opened this issue Mar 29, 2018 · 1 comment
Open

how to use proxy #1

jiuli opened this issue Mar 29, 2018 · 1 comment

Comments

@jiuli
Copy link

jiuli commented Mar 29, 2018

set_by_lua $time "local num = tonumber(ngx.var.arg_ts) if num then return (os.time()-num-100) else return 1 end";
if ($time !~ ^-){ #能解析下,这个是怎么匹配的?
more_set_headers 'X-Ts:$time' 'Content-Type:text/plain';
return 403 "token is out of date!";
break;
}

@imlzw
Copy link
Collaborator

imlzw commented Apr 9, 2018

$time !~ ^- 表示不能为-开头的值,即 $time不是负数值

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants