Feature #1862
closed
API: Create HTTPS URLs when an instance is using SSL
Added by Andreas Olschnögger about 2 years ago.
Updated about 2 years ago.
Description
Currently the URLs are specified in the API with http. Many browsers update the request to https, but some block it. For example, request to image links are blocked on Safari on IOS and can therefore not be shown. Optimal would be a solution where the API returns the correct URL right away.
Solution
If the site is behind a reverse proxy the solution seems to be to add this line to the virtal host section of the Apache config file:
SetEnvIf X-Forwarded-Proto "https" HTTPS=on
- Subject changed from Show the urls with https when the OpenAtlas instance is running with ssl to API: Show URLs with https when an OpenAtlas instance is using SSL
- Description updated (diff)
- Status changed from New to Assigned
- Target version set to Wishlist
- Category changed from API to Administration
The problem is not with the API directly. Of course, I could force url_for() to use https, however all versions without SSL certificate, e.g. local instances and development instances, have problems with broken links.
Apart from not wanting to hardcode the correct protocol into the API, we should look for a server-side solution. Instances like demo, demo-dev and THANADOS (https://demo-dev.openatlas.eu/api/entity/9408) resolve the links correctly, while the instances on the ACDH-CH server resolve the links only with http:// (https://shahi.openatlas.eu/api/0.3/entity/853).
- Description updated (diff)
- Status changed from Assigned to Closed
- Assignee changed from Bernhard Koschiček-Krombholz to Alexander Watzinger
- Target version deleted (
Wishlist)
- Subject changed from API: Show URLs with https when an OpenAtlas instance is using SSL to API: Create HTTPS URLs when an instance is using SSL
Also available in: Atom
PDF