freedomofpress / securethenews

An automated scanner and web dashboard for tracking TLS deployment across news organizations
https://securethe.news
GNU Affero General Public License v3.0
100 stars 25 forks source link

API not using FQDN as base URL #157

Open conorsch opened 6 years ago

conorsch commented 6 years ago

First reported by @thisisparker . The API is not returning well structured URLs for subsequent calls:

$ curl -s https://securethe.news/api/v1/sites/ | grep -P 'https://[\w.]+' -o | sort | uniq -c
    101 https://127.0.0.1

Why?

conorsch commented 6 years ago

Fixed. The issue was a misconfigured proxy setting in the prod environment. As a stopgap we added 127.0.0.1 to the ALLOWED_HOSTS env var, but doing so broke the API rendering. Leaving issue open until the revision lands in (backend) version control.