mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
added FORCE_CODE_SSL
env
This commit is contained in:
parent
47a8734a03
commit
6ee11d7789
@ -109,7 +109,7 @@ export default async (req, res) => {
|
|||||||
let widgetCode = null
|
let widgetCode = null
|
||||||
|
|
||||||
// get origin from request url
|
// get origin from request url
|
||||||
const origin = `${req.protocol}://${req.get("host")}/static/widgets/${widgetId}@${requestedVersion}/`
|
const origin = `${toBoolean(process.env.FORCE_CODE_SSL) ? "https" : req.protocol}://${req.get("host")}/static/widgets/${widgetId}@${requestedVersion}/`
|
||||||
const remotePath = `/widgets/${widgetId}@${requestedVersion}/`
|
const remotePath = `/widgets/${widgetId}@${requestedVersion}/`
|
||||||
|
|
||||||
const remoteEntyFilePath = path.join(remotePath, widget.manifest.main)
|
const remoteEntyFilePath = path.join(remotePath, widget.manifest.main)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user