handle default page in nginx

This commit is contained in:
nitram 2019-01-29 15:22:50 -08:00
parent ff12c7f919
commit 979211bc1c
No known key found for this signature in database
GPG Key ID: 2352C35346C5D534
2 changed files with 6 additions and 16 deletions

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<title>Blockstream Satellite API</title>
<h3>The Blockstream Satellite API conducts an auction for global message broadcast over Blockstream Satellite. Payments by Lightning.</h3>
<b>
<p>Learn more: <a href="https://blockstream.com/satellite-api-documentation/" target="_blank">Satellite API Docs</a></p>
<p>Contribute: <a href="https://github.com/blockstream/satellite-api" target="_blank">Satellite API Code</a></p>
</b>
<h4>To connect via Tor, prefix your API calls with our .onion URL. For example:</h4>
<p>http://sq65ekkwppmgka5pygi5vbp3l6jkpmxqnue5doiqhdobs55g7cyqsiyd.onion/api/orders/pending</p>
</body>
</html>

View File

@ -60,7 +60,7 @@ write_files:
}
# Proxy to main ionosphere API
location /api/ {
location /api {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE' always;
add_header 'Access-Control-Allow-Headers' 'X-Auth-Token,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
@ -71,6 +71,11 @@ write_files:
return 200;
}
if ($request_uri ~* "^/api/?$")
{
return 301 https://$host;
}
proxy_pass http://0.0.0.0:9292/;
}