hotfix: production uses NEXT_PUBLIC_MEDIA_DOMAIN (#2126)
This commit is contained in:
parent
ac26fdfb14
commit
addd1263ab
@ -202,8 +202,10 @@ export async function processCrop ({ photoId, cropData }) {
|
|||||||
`/rs:fill:${size}:${size}`
|
`/rs:fill:${size}:${size}`
|
||||||
].join('')
|
].join('')
|
||||||
|
|
||||||
const uploadsUrl = process.env.MEDIA_URL_DOCKER || process.env.NEXT_PUBLIC_MEDIA_URL
|
// in dev we may use MEDIA_URL_DOCKER or NEXT_PUBLIC_MEDIA_URL
|
||||||
const url = new URL(photoId, uploadsUrl).toString()
|
// in prod we use NEXT_PUBLIC_MEDIA_DOMAIN
|
||||||
|
const uploadsUrl = process.env.MEDIA_URL_DOCKER || process.env.NEXT_PUBLIC_MEDIA_URL || `https://${process.env.NEXT_PUBLIC_MEDIA_DOMAIN}`
|
||||||
|
const url = `${uploadsUrl}/${photoId}`
|
||||||
console.log('[imgproxy - cropjob] id:', photoId, '-- url:', url)
|
console.log('[imgproxy - cropjob] id:', photoId, '-- url:', url)
|
||||||
|
|
||||||
const pathname = '/'
|
const pathname = '/'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user