Minor fix and move URLs to .app

This commit is contained in:
Ian Renton
2025-10-07 16:20:03 +01:00
parent 2dcfae98f8
commit abff65f78d
5 changed files with 12 additions and 12 deletions

View File

@@ -16,7 +16,7 @@ Supported data sources include DX Clusters, the Reverse Beacon Network (RBN), th
### Accessing the public version ### Accessing the public version
You can access the public version's web interface at [https://spothole.m0trt.radio](https://spothole.m0trt.radio), and see [https://spothole.m0trt.radio/apidocs](https://spothole.m0trt.radio/apidocs) for the API details. You can access the public version's web interface at [https://spothole.app](https://spothole.app), and see [https://spothole.app/apidocs](https://spothole.app/apidocs) for the API details.
Please note this URL is not necessarily final, and the API is likely to change as the project works its way towards v1.0. Please do not build anything on the Spothole API yet! Please note this URL is not necessarily final, and the API is likely to change as the project works its way towards v1.0. Please do not build anything on the Spothole API yet!
@@ -81,7 +81,7 @@ Check the service has started up correctly with `sudo journalctl -u spothole -f`
It's best not to serve Spothole directly on port 80, as that requires root privileges and prevents us using HTTPS, amongst other reasons. To set up nginx as a reverse proxy that sits in front of Spothole, first ensure it's installed e.g. `sudo apt install nginx`, and enabled e.g. `sudo systemd enable nginx`. It's best not to serve Spothole directly on port 80, as that requires root privileges and prevents us using HTTPS, amongst other reasons. To set up nginx as a reverse proxy that sits in front of Spothole, first ensure it's installed e.g. `sudo apt install nginx`, and enabled e.g. `sudo systemd enable nginx`.
Create a file at `/etc/nginx/sites-available/` called `spothole`. Give it the following contents, replacing `spothole.m0trt.radio` with the domain name on which you want to run Spothole. If you changed the port on which Spothole runs, update that on the "proxy_pass" line too. Create a file at `/etc/nginx/sites-available/` called `spothole`. Give it the following contents, replacing `spothole.app` with the domain name on which you want to run Spothole. If you changed the port on which Spothole runs, update that on the "proxy_pass" line too.
```nginx ```nginx
map $request_uri $xssorigin { map $request_uri $xssorigin {
@@ -89,7 +89,7 @@ map $request_uri $xssorigin {
} }
server { server {
server_name spothole.m0trt.radio; server_name spothole.app;
# Wellknown area for Lets Encrypt # Wellknown area for Lets Encrypt
location /.well-known/ { location /.well-known/ {

View File

@@ -132,7 +132,7 @@ class WebServer:
spots = [] spots = []
for k in spot_ids: for k in spot_ids:
spots.append(self.spots.get(k)) spots.append(self.spots.get(k))
spots = sorted(spots, key=lambda spot: spot.time, reverse=True) spots = sorted(spots, key=lambda spot: (spot.time if spot and spot.time else 0), reverse=True)
for k in query.keys(): for k in query.keys():
match k: match k:
case "since": case "since":
@@ -187,7 +187,7 @@ class WebServer:
alerts = [] alerts = []
for k in alert_ids: for k in alert_ids:
alerts.append(self.alerts.get(k)) alerts.append(self.alerts.get(k))
alerts = sorted(alerts, key=lambda alert: alert.start_time) alerts = sorted(alerts, key=lambda alert: (alert.start_time if alert and alert.start_time else 0))
for k in query.keys(): for k in query.keys():
match k: match k:
case "received_since": case "received_since":

View File

@@ -13,10 +13,10 @@
<meta property="twitter:title" content="Spothole"/> <meta property="twitter:title" content="Spothole"/>
<meta name="description" content="An Amateur Radio spotting tool bringing together DX clusters and outdoor programmes, providing a universal JSON API and web interface."/> <meta name="description" content="An Amateur Radio spotting tool bringing together DX clusters and outdoor programmes, providing a universal JSON API and web interface."/>
<meta property="og:description" content="An Amateur Radio spotting tool bringing together DX clusters and outdoor programmes, providing a universal JSON API and web interface."/> <meta property="og:description" content="An Amateur Radio spotting tool bringing together DX clusters and outdoor programmes, providing a universal JSON API and web interface."/>
<link rel="canonical" href="https://spothole.m0trt.radio/"/> <link rel="canonical" href="https://spothole.app/"/>
<meta property="og:url" content="https://spothole.m0trt.radio/"/> <meta property="og:url" content="https://spothole.app/"/>
<meta property="og:image" content="https://spothole.m0trt.radio/img/banner.png"/> <meta property="og:image" content="https://spothole.app/img/banner.png"/>
<meta property="twitter:image" content="https://spothole.m0trt.radio/img/banner.png"/> <meta property="twitter:image" content="https://spothole.app/img/banner.png"/>
<meta name="twitter:card" content="summary_large_image"/> <meta name="twitter:card" content="summary_large_image"/>
<meta name="author" content="Ian Renton"/> <meta name="author" content="Ian Renton"/>
<meta property="og:locale" content="en_GB"/> <meta property="og:locale" content="en_GB"/>

View File

@@ -12,7 +12,7 @@ info:
url: https://unlicense.org/#the-unlicense url: https://unlicense.org/#the-unlicense
version: 0.1 version: 0.1
servers: servers:
- url: https://spothole.m0trt.radio/api - url: https://spothole.app/api
paths: paths:
/spots: /spots:
get: get:

View File

@@ -5,7 +5,7 @@
"short_name": "Spothole", "short_name": "Spothole",
"scope": "/", "scope": "/",
"display": "standalone", "display": "standalone",
"start_url": "https://spothole.m0trt.radio/", "start_url": "https://spothole.app/",
"background_color": "white", "background_color": "white",
"theme_color": "white", "theme_color": "white",
"description": "An Amateur Radio spotting tool bringing together DX clusters and outdoor programmes, providing a universal JSON API and web interface.", "description": "An Amateur Radio spotting tool bringing together DX clusters and outdoor programmes, providing a universal JSON API and web interface.",
@@ -25,5 +25,5 @@
"purpose": "maskable" "purpose": "maskable"
} }
], ],
"url": "https://spothole.m0trt.radio" "url": "https://spothole.app"
} }