bitcoiner.social/ansible/playbooks/host_tasks/gabite.bitcoiner.social/files/nginx/nostr.bitcoiner.social.conf

34 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

server {
include /etc/nginx/acme_nostr.bitcoiner.social.conf;
listen 443 ssl;
listen [::]:443 ssl;
access_log off;
location / {
# Intercept NIP-11
if ($is_nostr_and_not_socket = 1) {
return 200 '{"contact":"nostr@bitcoiner.social","description":"A fast, reliable, and up-to-date nostr relay with monitored server availability and nightly off-site backups.","name":"bitcoiner.social","pubkey":"ece3317bf8163930b5dafae50596b740b0608433b78568886a9a712a91a5d59b","software":"git+https://github.com/hoytech/strfry.git","supported_nips":[1,2,4,9,11,12,16,20,22,28,33,40],"version":"0.9.6","icon":"https://bitcoiner.social/favicon.ico"}';
}
# Web Browsers
#if ($is_socket_or_nostr = 0) {
# return 301 https://www.offchain.pub;
#}
proxy_connect_timeout 3m;
proxy_http_version 1.1;
proxy_pass http://strfry;
proxy_read_timeout 3m;
proxy_send_timeout 3m;
proxy_set_header Host $http_host;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}