Use relative url path for reverse proxy hosting on template thumbnails (#2959)

This commit is contained in:
Chenlei Hu
2025-03-10 10:13:41 -04:00
committed by GitHub
parent 3eb036b5e3
commit abe4754904

View File

@@ -103,8 +103,8 @@ const isHovered = useElementHover(cardRef)
const getThumbnailUrl = (index = '') => {
const basePath =
sourceModule === 'default'
? `/templates/${template.name}`
: `/api/workflow_templates/${sourceModule}/${template.name}`
? `templates/${template.name}`
: `api/workflow_templates/${sourceModule}/${template.name}`
// For templates from custom nodes, multiple images is not yet supported
const indexSuffix = sourceModule === 'default' && index ? `-${index}` : ''