Skip to main content

splent_feature_nginx

Nginx reverse proxy for SPLENT products (config archetype). It ships no Python behaviour of its own: it brings an nginx container that sits in front of the product's web service and answers on the product's HTTP and HTTPS ports.

What it provides

  • Docker:
    • docker/docker-compose.dev.yml, nginx in front of the development server.
    • docker/docker-compose.prod.yml, built from docker/Dockerfile.prod, with the certbot_webroot and letsencrypt volumes for TLS certificates. Both join splent_network, where they reach the product as NGINX_UPSTREAM_HOST:NGINX_UPSTREAM_PORT.
  • Server templates in docker/nginx/templates/, one per environment, rendered by the nginx image at start.
  • docker/nginx/locations/, where a product drops extra location blocks. protected-files.conf.example shows how to serve files the app has authorised through X-Accel-Redirect.
  • An entrypoint script, 15-splent-trusted-proxies.sh, that trusts X-Forwarded-Proto and X-Forwarded-Host only from NGINX_TRUSTED_PROXY_CIDRS.
  • An nginx entry in the Administration section of the menu registry, for administrators only. It opens the site through the proxy, at NGINX_SERVER_NAME (its first name that is a host) on NGINX_HTTP_HOST_PORT, in a new tab. It needs splent_framework>=1.21.0.
  • For one more minor, the same link in the signed-in sidebar slot (layout.authenticated_sidebar), at localhost as before, for the shells that still draw slots instead of the registry.

Configuration

Env var Default Purpose
NGINX_UPSTREAM_HOST __PRODUCT___web The product's web container, resolved to the product name by product:env --merge and product:build.
NGINX_UPSTREAM_PORT 5000 Port the web container listens on.
NGINX_HTTP_HOST_PORT 80 Host port for HTTP. Gets the product's port offset.
NGINX_HTTPS_HOST_PORT 443 Host port for HTTPS. Gets the product's port offset.
NGINX_SERVER_NAME localhost server_name of the virtual host.
NGINX_TRUSTED_PROXY_CIDRS empty Peers allowed to set the forwarded headers. Empty trusts nobody. Set it only behind a TLS terminator on the host.

Use it in a product

splent feature:add splent_feature_nginx

Metadata

Release files for splent-feature-nginx 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for splent-feature-nginx 1.3.0
File Size Uploaded Provenance
splent_feature_nginx-1.3.0.tar.gz 18.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for splent-feature-nginx 1.3.0
File Interpreter ABI Platform
splent_feature_nginx-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.7 kB

Release files / splent_feature_nginx-1.3.0.tar.gz

Download URL splent_feature_nginx-1.3.0.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f320da561bd123ac9b144371e9550545e8920ec2ff83c7dd8d46b03230d91e56
BLAKE2b-256 checksum
How to use checksums
8b4b74c0560881711b813db07f7744b018661c642a4be94429908e816bc805bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.16

Release files / splent_feature_nginx-1.3.0-py3-none-any.whl

Download URL splent_feature_nginx-1.3.0-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd0783f2eae8b136f5ddfa615fcfa75cff6cce3aba28c78401aad9097e4a0dcd
BLAKE2b-256 checksum
How to use checksums
8e3f486cf1de1c171931bbb0e3ec42eac7fa33bf45c7202468038570ae1ad892
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.16

Security for splent-feature-nginx 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page