garethr / Nginx Json Proxy
An experiment with openresty, lua and nginx
Stars: ✭ 10
Labels
Projects that are alternatives of or similar to Nginx Json Proxy
React Express Fullstack
Full stack (mostly unopinionated) starter pack with React+Redux and Expressjs
Stars: ✭ 23 (+130%)
Mutual labels: nginx
Nuxt Ssr Demo
✨ 高仿掘金,整合 vue + nuxt + axios + vuex + vue-router (nuxt 自带 vuex 和 vue-router),一个基于 Nuxt 的服务器端渲染 Demo
Stars: ✭ 856 (+8460%)
Mutual labels: nginx
Ansible Nginx Drupal
Ansible role to configure Nginx for running Drupal using perusio's configuration
Stars: ✭ 23 (+130%)
Mutual labels: nginx
Ngx mruby Package Builder
Package Builder of ngx_mruby with Docker
Stars: ✭ 25 (+150%)
Mutual labels: nginx
Nginx Auth Proxy
Authentication for multiple services using nginx
Stars: ✭ 22 (+120%)
Mutual labels: nginx
Status Nginx Module
A http status module for pure nginx, which is in production already.
Stars: ✭ 10 (+0%)
Mutual labels: nginx
Ngx http proxy connect module
A forward proxy module for CONNECT request handling
Stars: ✭ 850 (+8400%)
Mutual labels: nginx
Jale
Jale is a blazing fast local development environment for MacOS written in Typescript.
Stars: ✭ 24 (+140%)
Mutual labels: nginx
Meteorn
MeteorN - A Simple Tool to Run Meteor App with an Nginx Reverse Proxy
Stars: ✭ 25 (+150%)
Mutual labels: nginx
Springbootunity
rabbitmq、redis、scheduled、socket、mongodb、Swagger2、spring data jpa、Thymeleaf、freemarker etc. (muti module spring boot project) (with spring boot framework,different bussiness scence with different technology。)
Stars: ✭ 845 (+8350%)
Mutual labels: nginx
The World Is Yours
Nginx L7 DDoS Protection! And many more features 💥 ⚡️
Stars: ✭ 20 (+100%)
Mutual labels: nginx
Docker Php Nginx
Lightwight Docker image for the (latest) PHP-FPM and Nginx based on AlpineLinux
Stars: ✭ 22 (+120%)
Mutual labels: nginx
Docker Socket Http Proxy
Simple nginx proxy container for the docker socket
Stars: ✭ 7 (-30%)
Mutual labels: nginx
Hack Lang Hhvm Resources
Landscaping With Hack Lang & HHVM Resources
Stars: ✭ 10 (+0%)
Mutual labels: nginx
nginx-json-proxy
Ever wanted make sure you're only passing JSON across a boundary? Every thought the best place to do this would be in Lua embedded in nginx? This project is for you.
Usage
You can test out the example by running openresty:
openresty -c `pwd`/config/nginx.conf
Then making requests via curl:
# valid JSON
curl -X POST -d '["bob", "jim"]' http://localhost:3000/
["bob","jim"]
# invalid JSON
curl -X POST -d '["bob", "jim]' http://localhost:3000/
invalid request
Rather than use a real backend the example currently just hard codes the response. If you change the response by commenting line 66 and uncommenting line 67 to return invalid JSON then you should get:
# valid JSON, with invalid JSON response
curl -X POST -d '["bob", "jim"]' http://localhost:3000/
invalid response
Installing OpenResty
brew install openresty
brew install lua51
Installing cjson
wget https://github.com/keplerproject/luarocks/archive/v2.2.2.tar.gz
tar xfv v2.2.2.tar.gz
cd luarocks-2.2.2
./configure
make build
make install
luarocks install lua-cjson
Thanks
Thanks to Tommy Hall and his nginx-lua-examples for the Rakefile and Procfile which made getting started easier.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].