openresty / openresty/openresty
How to configure dynamically location expression
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
Thank you very much for your openresty!
I have a problem,We want to have a choice to cache the type of file,Sometimes i just want to cache GIF, or just want to cache JPG.
So I set it this way in nginx.conf
"
set $proxy_rule "/";
location $proxy_rule {
XXXXXXX
}
"
The idea is to dynamically set $proxy_rule in Lua,But this configure is wrong,maybe it parsing "$proxy_rule" with regular expressions in the first,and we can't get "$proxy_rule" value。
I want to take this expression in Lua, I will resign myself to your guidance. Thank you very much.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the nginx.conf example in the issue and how OpenResty exposes Lua configuration hooks. Determine whether dynamically selecting a location expression is supported; done means providing a documented configuration approach or confirming that the requested behavior is not available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100