update at 2026-02-09 16:09:44
This commit is contained in:
@@ -86,9 +86,12 @@ async function renderPngByApi(payload) {
|
||||
? Number(app.globalData.apiTimeoutMs)
|
||||
: 30000
|
||||
const baseApiUrl = buildApiUrl()
|
||||
const apiUrl = /\/api\/render-svg$/.test(baseApiUrl)
|
||||
? baseApiUrl.replace(/\/api\/render-svg$/, '/api/render-png')
|
||||
: `${baseApiUrl.replace(/\/$/, '')}/render-png`
|
||||
const configuredPngApiUrl = app && app.globalData ? app.globalData.pngRenderApiUrl : ''
|
||||
const apiUrl = configuredPngApiUrl || (
|
||||
/\/api\/render-svg$/.test(baseApiUrl)
|
||||
? baseApiUrl.replace(/\/api\/render-svg$/, '/api/render-png')
|
||||
: `${baseApiUrl.replace(/\/$/, '')}/render-png`
|
||||
)
|
||||
|
||||
const response = await request({
|
||||
url: apiUrl,
|
||||
|
||||
Reference in New Issue
Block a user