You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ovoshlook It's your responsibility to ensure that only valid Lua file paths are passed to content_by_lua_file. File name extensions never matter here. In your example you should put your second location before the 1st because the second should take precedence.
You can check out the openresty.org and openresty-survey web apps for real-world examples of mixing Lua powered locations and other static assets:
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)$ { }
The text was updated successfully, but these errors were encountered: