https://github.com/bitcryptic-gw/proxy-aware-https-fix
WordPress plugin to enforce HTTPS detection and REST API resolution behind reverse proxies like Caddy
https://github.com/bitcryptic-gw/proxy-aware-https-fix
Last synced: about 19 hours ago
JSON representation
WordPress plugin to enforce HTTPS detection and REST API resolution behind reverse proxies like Caddy
- Host: GitHub
- URL: https://github.com/bitcryptic-gw/proxy-aware-https-fix
- Owner: bitcryptic-gw
- License: other
- Created: 2025-09-11T06:59:15.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-11T13:51:43.000Z (10 months ago)
- Last Synced: 2025-09-11T15:23:32.981Z (10 months ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Proxy-Aware HTTPS Fix
A lightweight WordPress plugin that enforces HTTPS detection and correct REST API resolution when running behind reverse proxies like Caddy, Nginx, or Traefik.
## Features
- Forces `$_SERVER['HTTPS'] = 'on'` when a genuine `X-Forwarded-Proto: https` header is present
- Rewrites `home_url()` and `site_url()` to `https://` when HTTPS has been detected (no longer unconditional)
- Ensures Rank Math SEO plugin uses the correct REST API base
- Compatible with Dockerized WordPress stacks and reverse proxy setups
## Installation
1. Download or clone this repository into your WordPress `wp-content/plugins/` directory.
2. Activate the plugin via the WordPress admin dashboard.
## Usage
No configuration required. The plugin auto-detects proxy headers and enforces HTTPS behavior.
## Author
**BitCryptic**
Built by BitCryptic for scalable, proxy-aware WordPress deployments.
## License
MIT — see [LICENSE](LICENSE) for details.