openresty / openresty/openresty.org
openresty see .css/.js as lua file
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.3k
- Forks
- 293
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 2
Description
Hi. Lua module tries to enterpretate all css/js files as lua fies.
*95 failed to load external Lua file "/usr/local/openresty/nginx/html/mysite/themes/default/js/jquery-1.10.2.min.js":
My config
location ~^/mysite/(.+) {
default_type text/html;
lua_need_request_body on;
lua_code_cache off;
content_by_lua_file html/mysite/$1;
index index.lua index.lp;
}
location ~* ^.+.(?:css|eot|js|json|png|svg|ttf|woff)$ { }
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 with the provided nginx location blocks, especially content_by_lua_file and the static-file location, and reproduce how the jquery-1.10.2.min.js request is routed. Trace which location handles that request and verify that CSS and JavaScript assets are no longer passed to Lua while Lua files still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100