API returns http:// URLs though https:// should be used

When things don't work as they should.
Post Reply
DrRSatzteil
Posts: 12
Joined: Mon Oct 26, 2020 11:38 pm

API returns http:// URLs though https:// should be used

Post by DrRSatzteil »

When I call "https://my.domain:8443/api/v4/content_types/", I receive this answer with next url starting with "http://":

Code: Select all

GET /api/v4/content_types/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 136,
    "next": "http://my.domain:8443/api/v4/content_types/?page=2",
    "previous": null,
    "results":
[
...
The COMMON_PROJECT_URL is set to "https://my.domain:8443"

Is there a different setting to fix this or is this a bug?
User avatar
michael
Developer
Developer
Posts: 163
Joined: Sun Apr 19, 2020 6:21 am

Re: API returns http:// URLs though https:// should be used

Post by michael »

Update the ORGANIZATIONS_INSTALLATION_URL setting with the fully qualified domain including the HTTPS schema.
2021-07-17_01-33.png
2021-07-17_01-33.png (48.13 KiB) Viewed 73 times
DrRSatzteil
Posts: 12
Joined: Mon Oct 26, 2020 11:38 pm

Re: API returns http:// URLs though https:// should be used

Post by DrRSatzteil »

Thank you Michael!

Should this also work behind a separate reverse proxy? I just tried this and my instance was not reachable after this change.
Post Reply