mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
fix publics envs
This commit is contained in:
parent
bbf7d32ad0
commit
59523637f3
@ -7,7 +7,7 @@ import pmap from "../../utils/pMap"
|
||||
const formidable = require("formidable")
|
||||
|
||||
export function resolveToUrl(filepath, req) {
|
||||
const host = req ? (req.protocol + "://" + req.get("host")) : global.globalPublicURI
|
||||
const host = req ? (req.protocol + "://" + req.get("host")) : global.globalPublicUri
|
||||
|
||||
return `${host}/storage/${filepath}`
|
||||
}
|
||||
|
@ -89,7 +89,10 @@ class Server {
|
||||
|
||||
global.wsInterface = this.httpInstance.wsInterface
|
||||
global.httpListenPort = this.listenPort
|
||||
global.globalPublicURI = this.env.globalPublicURI
|
||||
|
||||
global.publicHostname = this.env.publicHostname
|
||||
global.publicProtocol = this.env.publicProtocol
|
||||
global.globalPublicUri = `${this.env.publicProtocol}://${this.env.publicHost}`
|
||||
|
||||
global.uploadPath = this.env.uploadPath ?? path.resolve(process.cwd(), "uploads")
|
||||
global.uploadCachePath = this.env.uploadCachePath ?? path.resolve(process.cwd(), "cache")
|
||||
|
Loading…
x
Reference in New Issue
Block a user