Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Commit 200eee2

Browse files
fix image url in imageFunction (#159)
1 parent bdd3ce2 commit 200eee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/templates/imageFunction.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports.handler = async (event) => {
77
const quality = parseInt(q);
88

99
const imageUrl = url.startsWith("/")
10-
? `${process.env.URL || "http://localhost:8888"}${url}`
10+
? `${process.env.DEPLOY_URL || `http://${event.headers.host}`}${url}`
1111
: url;
1212
const image = await jimp.read(imageUrl);
1313

0 commit comments

Comments
 (0)