HTTP/2 Configuration
This document explains how HTTP/2 is configured in the 95octane API service.
Overview
The service now supports HTTP/2 with the following configurations:
- Production: HTTP/2 over HTTPS (handled by Google Cloud Run)
- Development: HTTP/2 over cleartext (h2c) - works well with reverse proxies
- Local HTTPS: HTTP/2 over HTTPS with custom certificates (optional)
Environment Variables
HTTP2
- Default:
true - Description: Enables HTTP/2 support
- Example:
export HTTP2="true"
HTTPS
- Default:
false - Description: Enables HTTPS mode (requires SSL certificates)
- Example:
export HTTPS="true"
SSL_KEY
- Default:
undefined - Description: Path to SSL private key file (required when HTTPS=true)
- Example:
export SSL_KEY="/path/to/private.key"
SSL_CERT
- Default:
undefined - Description: Path to SSL certificate file (required when HTTPS=true)
- Example:
export SSL_CERT="/path/to/certificate.crt"
Configuration Modes
1. HTTP/2 over Cleartext (h2c) — Development Default
export HTTP2="true"
export HTTPS="false"
This is the global default configuration (HTTP2=true in mise.toml). It
enables HTTP/2 without requiring SSL certificates, which works well when running
behind a reverse proxy (nginx, Cloud Run, etc.).
2. HTTP/2 over HTTPS — Production/Secure Development
export HTTP2="true"
export HTTPS="true"
export SSL_KEY="/path/to/private.key"
export SSL_CERT="/path/to/certificate.crt"
3. HTTP/1.1 — Fallback
export HTTP2="false"
Google Cloud Run Deployment
Google Cloud Run automatically handles SSL certificate provisioning, HTTP/2 termination, and load balancing. The service uses HTTP/2 over cleartext internally while Cloud Run provides HTTPS termination for external clients.