Skip to content

Commit 6dbfb5b

Browse files
committed
add docs about ssl verify for proxy pass http client
1 parent 8244775 commit 6dbfb5b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

docs/utilities.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,26 @@ location /proxy {
671671
> This code ensures that the correct headers are set for the subrequest that is
672672
> created.
673673
674+
#### Enabling SSL Verification
675+
676+
By default, nginx's `proxy_pass` does not verify SSL certificates. To enable
677+
SSL verification, add the following directives to your `/proxy` location:
678+
679+
```nginx
680+
location /proxy {
681+
# ... existing configuration ...
682+
683+
proxy_ssl_verify on;
684+
proxy_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
685+
}
686+
```
687+
688+
The path to the CA certificates file varies by operating system:
689+
690+
* Debian/Ubuntu/Gentoo/Arch Linux: `/etc/ssl/certs/ca-certificates.crt`
691+
* RHEL/CentOS/Fedora: `/etc/pki/tls/certs/ca-bundle.crt`
692+
* Alpine: `/etc/ssl/cert.pem`
693+
674694
Additionally, in the nginx `location` that processes your Lapis requests, you
675695
need to define the `$_url` variable, which will hold the request URL.
676696

lapis/nginx/http.moon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
-- resolver 8.8.8.8;
2626
-- proxy_http_version 1.1;
2727
-- proxy_pass $_url;
28+
--
29+
-- # Enable SSL certificate verification
30+
-- proxy_ssl_verify on;
31+
-- proxy_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
2832
-- }
2933
--
3034
--

0 commit comments

Comments
 (0)