default https

This commit is contained in:
Daniël 2024-10-01 10:06:20 +02:00 committed by GitHub
parent 95587b94a7
commit 26534377bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,7 +36,7 @@ if (storageMode === "local") {
const uploadFile = (req, res) => { const uploadFile = (req, res) => {
storageEngine.writeFile(req, res, () => { storageEngine.writeFile(req, res, () => {
const fileHostDomain = const fileHostDomain =
process.env.FILEHOST_DOMAIN || `${req.protocol}://${req.get("host")}`; process.env.FILEHOST_DOMAIN || `https://${req.get("host")}`;
res.status(200).json({ res.status(200).json({
message: "File uploaded successfully", message: "File uploaded successfully",
url: `${fileHostDomain}/u/${req.filePath}`, url: `${fileHostDomain}/u/${req.filePath}`,