Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Normal
Category:
Administration
Target version:
-
Start date:
2022-10-27
Estimated time:

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

Actions #1

Updated by Alexander Watzinger about 2 years ago

  • 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
Actions #2

Updated by Alexander Watzinger about 2 years ago

Because there was no target version set I put this on the wishlist for now. @ @Bernhard Koschiček-Krombholz: feel free to set another one.

Actions #3

Updated by Alexander Watzinger about 2 years ago

  • Target version set to Wishlist
Actions #4

Updated by Bernhard Koschiček-Krombholz about 2 years ago

  • 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).

Actions #5

Updated by Alexander Watzinger about 2 years ago

  • Description updated (diff)
  • Status changed from Assigned to Closed
  • Assignee changed from Bernhard Koschiček-Krombholz to Alexander Watzinger
  • Target version deleted (Wishlist)
Actions #6

Updated by Alexander Watzinger about 2 years ago

  • 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
Actions

Also available in: Atom PDF