Comments (5)
@chirkin Please use the ngx_lua module instead. It is just a single line for your use case:
rewrite_by_lua 'ngx.req.read_body()';
Simple enough. Although ngx_lua is way more powerful than just that.
from echo-nginx-module.
@agentzh Thank you, it is really more powerful. I think the performance is not much affected.
from echo-nginx-module.
@agentzh I found that this solution has drawbacks. In particular postgres_escape function is called before than the ngx.req.read_body() processed. I need to protect sql query. Do you have any solutions?
from echo-nginx-module.
@chirkin Well, just use the ndk.set_var.set_quote_pgsql_str()
API function in Lua to do the escaping. You'll need the ngx_set_misc module too. See
https://github.com/openresty/lua-nginx-module#ndkset_vardirective
https://github.com/openresty/set-misc-nginx-module#set_quote_pgsql_str
from echo-nginx-module.
@agentzh Bravo! Thank you!
from echo-nginx-module.
Related Issues (20)
- multiple definition of `ngx_http_echo_exec_echo_end' HOT 1
- Trying to compile with Windows
- Bad homepage HOT 1
- Compatibility? HOT 3
- Returns an empty page
- echo_client_request_headers HTTP2 support
- Update nginx 1.25.5
- openresty1.25.5编译添加echo-nginx-module-0.63报错:collect2: error: ld returned 1 exit status HOT 1
- how to install echo module on windows HOT 1
- echo_foreach_split join delimiter HOT 1
- how can I enable this module in a alpine docker container HOT 1
- When I installed it and it didn't work HOT 1
- I don't seem to be able to do that either. HOT 1
- Please add instructions for including this module with a dockerfile HOT 1
- Error running the tests on ppc64le
- Problem with $request_body
- Failed to load HOT 2
- content_handler should work also on TLS webserver
- util/releng matches .gitignore
- NMAKE don't know how to make ddebug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from echo-nginx-module.