From 83982a1c189d8ac5104dbb291cd67893d6961f56 Mon Sep 17 00:00:00 2001 From: adarshm11 Date: Sun, 14 Dec 2025 19:04:05 -0800 Subject: [PATCH] add isbn loc to nginx conf --- nginx.conf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nginx.conf b/nginx.conf index 80e5114c4..4d6738a51 100644 --- a/nginx.conf +++ b/nginx.conf @@ -114,6 +114,23 @@ http { location / { proxy_pass http://webserver; } + location ~ ^/isbn/([0-9Xx-]+)$ { + set $isbn_number $1; + + resolver 8.8.8.8 valid=30s; + + proxy_set_header Host openlibrary.org; + + proxy_hide_header Access-Control-Allow-Origin; + add_header Access-Control-Allow-Origin *; + + + proxy_pass https://openlibrary.org/isbn/$isbn_number.json; + + + proxy_ssl_server_name on; + proxy_ssl_protocols TLSv1.2 TLSv1.3; + } } }