Skip to content

Commit 39435e5

Browse files
committed
use http urls for edgezone as directdownload fails for https
1 parent afd2b19 commit 39435e5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ui/src/views/infra/zone/ZoneWizardRegisterTemplate.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default {
8989
data: () => ({
9090
columns: null,
9191
loading: false,
92-
predefinedTemplates: null,
92+
predefinedTemplates: [],
9393
rowKey: 0,
9494
selectedRowKeys: [],
9595
defaultOsTypeId: null,
@@ -262,6 +262,15 @@ export default {
262262
this.predefinedTemplates = this.arch
263263
? templates.filter(template => template.arch === this.arch)
264264
: templates
265+
266+
// Replace 'https' with 'http' in all URLs for EdgeZone
267+
if (this.zoneSuperType === 'Edge') {
268+
this.predefinedTemplates.forEach(template => {
269+
if (template.url.startsWith('https://')) {
270+
template.url = template.url.replace('https://', 'http://')
271+
}
272+
})
273+
}
265274
} catch (error) {
266275
console.error('Error fetching predefined templates:', error)
267276
this.predefinedTemplates = []

0 commit comments

Comments
 (0)