Skip to content

jirutka/nginx-json-schema

Repository files navigation

NGINX JSON Schema

Tools

  • nginx-jsconf – JS library and a CLI tool to convert nginx configuration from YAML or JSON to nginx config format

  • nginx-json-schema-filter – Script to remove selected nginx modules from nginx-full.json

Examples

Directive without a value
ip_hash;
ip_hash: null
Repeated directive
allow 127.0.0.1;
allow ::1;
allow:
  - 127.0.0.1
  - ::1
Block directive without a parameter
events {
    worker_connections 4096;
}
events:
  worker_connections: 4096
Block directive with a parameter
location ~ ^/api/v[0-9]+/ {
    index on;
}
location / {
    index on;
}
location:
  '~ ^/api/v[0-9]+/':
    index: on
  /:
    index: on
Repeated directive in object notation
proxy_set_header Host $http_host;
proxy_set_header Forwarded $proxy_add_forwarded;
proxy_set_header:
  Host: $http_host
  Forwarded: $proxy_add_forwarded
Single directive with a scalar value
proxy_buffering off
proxy_buffering: false

License

This project is licensed under MIT License.

About

JSON schema for NGINX configuration

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project