collection of small and useful nginx add-ons.
License
FRiCKLE/ngx_coolkit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
ABOUT: ------ ngx_coolkit is collection of small and useful nginx add-ons. CONFIGURATION DIRECTIVES: ------------------------- override_method off | [methods] source (context: http, server, location) ------------------------------------------------------------------------ Override HTTP method. default: none CONFIGURATION VARIABLES: ------------------------ $remote_passwd ----------------- Decoded password from "Authorization" header (Basic HTTP Authentication). $location --------- Name of the matched location block. EXAMPLE CONFIGURATION #1: ------------------------- http { server { location / { override_method $arg_method; proxy_pass http://127.0.0.1:8100; } } } Pass request with changed HTTP method (based on "?method=XXX") to the backend. EXAMPLE CONFIGURATION #2: ------------------------- http { upstream database { postgres_server 127.0.0.1 dbname=test user=monty password=some_pass; } server { location = /auth { internal; set_quote_sql_str $user $remote_user; set_quote_sql_str $pass $remote_passwd; postgres_pass database; postgres_query "SELECT login FROM users WHERE login=$user AND pass=$pass"; postgres_rewrite no_rows 403; postgres_output none; } location / { auth_request /auth; root /files; } } } Restrict access to local files by authenticating against SQL database. Required modules (other than ngx_coolkit): - ngx_http_auth_request_module, - ngx_postgres (PostgreSQL) or ngx_drizzle (MySQL, Drizzle, SQLite), - ngx_set_misc.
About
collection of small and useful nginx add-ons.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published