Unverified Commit 9b36ca3e authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

use proxy for remote images


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent 9723f421
...@@ -117,7 +117,9 @@ def _extract_dig_obj_vals(msg, access_status) -> dict: ...@@ -117,7 +117,9 @@ def _extract_dig_obj_vals(msg, access_status) -> dict:
return_values['mimetype'] = mimetype return_values['mimetype'] = mimetype
if _is_remote_file(msg): if _is_remote_file(msg):
return_values['uri'] = msg['locator'] return_values['uri'] = msg['locator']
if access_status == 'public': if access_status == 'public' and not return_values['type'] == 'image':
# Remote images are always accessed via proxy because their respective
# route goes over the internal image server
return_values['proto'] = 'redirect' return_values['proto'] = 'redirect'
else: else:
return_values['proto'] = 'proxy' return_values['proto'] = 'proxy'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment