Skip to content

Commit 2c9552f

Browse files
try with x-forwarded
1 parent 20445e2 commit 2c9552f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sandbox/src/routes/r4/retrieveAttachment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = [
1919

2020
const binaryId = request.params.binaryId;
2121
const objectStore = "/ObjectStore/d497bbe3-f88b-45f1-b3d4-9c563e4c0f5f";
22-
const location = request.server.info.protocol + "://" + request.headers['host'] + objectStore;
22+
const location = request.headers['x-forwarded-proto'] + "://" + request.headers['x-forwarded-for'] + objectStore;
2323

2424
if ((validationUtil.hasLegacyPrefix(binaryId) || validationUtil.isValidUuid(binaryId)) && request.method === 'get') {
2525
const response = h.response().code(307);

0 commit comments

Comments
 (0)