Commit 917f4bc
authored
Add User-Agent header to Wikidata API requests (#693)
Fixes #692
This will send a user agent header of the form
```
OpenRailwayMap API (https://openrailwaymap.app), httpx 0.28.1, Python 3.13.9 (main, Oct 15 2025, 16:47:14) [GCC 14.2.0]
```
Now it works
```shell
http http://localhost:8000/api/wikidata/Q567336
HTTP/1.1 307 Temporary Redirect
Cache-Control: public, max-age=0, stale-if-error=0
Connection: keep-alive
Content-Length: 0
Date: Sun, 30 Nov 2025 14:46:38 GMT
Server: nginx/1.29.3
location: https://upload.wikimedia.org/wikipedia/commons/thumb/8/81/Bahnhof_Berlin-Wannsee_Empfangsgebaeude_04-2015.jpg/330px-Bahnhof_Berlin-Wannsee_Empfangsgebaeude_04-2015.jpg
```
Popup also shows images again
<img width="657" height="543" alt="image"
src="https://github.com/user-attachments/assets/79ccb99d-8de1-4591-9aba-27bda2cfa23a"
/>1 parent 4e13e82 commit 917f4bc
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | | - | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
0 commit comments