-
-
Notifications
You must be signed in to change notification settings - Fork 254
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
[FEAT] install njs scripting language #449
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
Have you confirmed it is not present? $ docker exec -it swag nginx -V 2>&1 | tr ' ' '\n' | grep njs
--add-dynamic-module=/home/buildozer/aports/main/nginx/src/njs-0.7.11/nginx |
Hello Roxedus Thanks for answering. When I run the docker exec instruction I got the same line, but not sure what can I do from it. I mean, if I try to go there, there is no folder or file and checking the njs conf examples neither the /etc/nginx/njs is present. Here is an example of a conf file :
|
You need the You then have the needed directives present, like Then you just have to configure nginx like normal, with the additional directives. My quick test was something like adding js_path "/config/nginx/njs/";
js_import main from hello.js; to the existing http block, where I created the njs directory, and put the hello.js file from the example repo you linked. location = /hello.html {
js_content main.hello;
} to a server block. |
Thank you so much Roxedus! |
Is this a new feature request?
Wanted change
I would like Nginx njs scripting language installed to perform additional actions not available on SWAG.
Reason for change
nsj would enable new capabilities, like checking apikey validity on nginx before a request reaches an upstream server, manipulating response headers or writing flexible asynchronous content handlers and filters
Proposed code change
I don't know the best approach. Maybe a dockermod would be better option because some users would not like to have njs by default for security concerns.
Here is the documentation.
The text was updated successfully, but these errors were encountered: