codeforIATI / iati-tables

https://iati-tables.codeforiati.org
MIT License
1 stars 0 forks source link

Next Page link is to localhost #32

Open stevieflow opened 4 months ago

stevieflow commented 4 months ago

Take a look at

https://datasette.codeforiati.org/iati/recipientcountry?_sort=rowid

The Next page link above the advance box:

Firefox_Screenshot_2024-02-15T17-23-45 905Z

links to a localhost URL: http://localhost:8080/iati/location?prefix__exact=fcdo&_next=248279%2C248279&_sort=rowid

Therefore, this link does not work

Thanks

stevieflow commented 4 months ago

I think this is the same on all pages

odscjames commented 4 months ago

That'll be cos of how we proxy through Apache on our server setup (other server setups may vary). I'm guessing https://docs.datasette.io/en/stable/settings.html#base-url will help. Want to have a look @tillywoodfield ?

tillywoodfield commented 4 months ago

We were missing ProxyPreserveHost On in the apache config (datasette docs), have updated that and the link should now work.

The only strange thing is that the link is with http not https, but you are automatically redirected back to https so it's not a problem as such... @odscjames do you have any ideas or happy to leave it as is?

odscjames commented 4 months ago

https://docs.datasette.io/en/stable/settings.html#base-url might help?

But this is a good partial solution so we can make the rest low priority now

tillywoodfield commented 4 months ago

I did try that and it didn't seem to change anything, but I'll have another look at some point