mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
UI should use relative path for back-end APIs
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
8a74fcb074
commit
c932ca9d2b
@ -17,4 +17,8 @@ if (!fs.existsSync(outputDir)) {
|
||||
fs.mkdirSync(outputDir);
|
||||
}
|
||||
const swaggerObj = yaml.load(fs.readFileSync(inputFile, {encoding: 'utf-8'}));
|
||||
// host is not needed as UI uses relative path for back-end APIs
|
||||
if (swaggerObj.host) {
|
||||
delete swaggerObj.host;
|
||||
}
|
||||
fs.writeFileSync(outputDir + '/swagger.json', JSON.stringify(swaggerObj, null, 2));
|
||||
|
Loading…
Reference in New Issue
Block a user