mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
nginx config notes
This commit is contained in:
@@ -92,18 +92,14 @@ server {
|
||||
alias /var/www/html/.well-known/;
|
||||
}
|
||||
|
||||
# Allow cross-origin API access
|
||||
location ~ ^/api/.*$ {
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
}
|
||||
|
||||
location / {
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
One further change you might want to make to the file above is the cross-origin API access block. This is what's used on
|
||||
One further change you might want to make to the file above is the `add_header Access-Control-Allow-Origin *;` statement. This is what's used on
|
||||
my own Spothole server to make sure that other third-party web-based software can get the data from my instance. If you want
|
||||
*your* Spothole instance to be set up the same way, so that others can write software in JavaScript that can access it,
|
||||
leave this intact. But if you want your Spothole instance to only be usable by scripts running on the web server you write,
|
||||
|
||||
Reference in New Issue
Block a user