This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
# | |
# Name: nginx-tls.conf | |
# Auth: Gavin Lloyd <[email protected]> | |
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating | |
# | |
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related | |
# to SSL/TLS are omitted here. | |
# | |
# Example: https://www.ssllabs.com/ssltest/analyze.html?d=gavinhungry.io | |
# |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
version: "3" | |
services: | |
db: | |
build: db | |
read_only: true | |
restart: unless-stopped | |
volumes: | |
- ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data | |
- /etc/localtime:/etc/localtime:ro | |
environment: |
<?php | |
// reference https://github.com/WP-API/WP-API/blob/develop/lib/infrastructure/class-wp-rest-server.php | |
// serve_request() function | |
add_filter( 'rest_pre_serve_request', 'multiformat_rest_pre_serve_request', 10, 4 ); | |
function multiformat_rest_pre_serve_request( $served, $result, $request, $server ) { | |
// assumes 'format' was passed into the intial API route | |
// example: https://baconipsum.com/wp-json/baconipsum/test-response?format=text |