fix(client,tools): update proxy and location paths (#37106)
This commit is contained in:
@ -3,22 +3,22 @@ const newsPlaceholderRE = /#\{\{NEWS\}\}/g;
|
||||
const forumPlacehilderRE = /#\{\{FORUM\}\}/g;
|
||||
|
||||
exports.createRedirects = function createRedirects(locations) {
|
||||
const { api, news, forum } = locations;
|
||||
const { api, newsProxy, forumProxy } = locations;
|
||||
|
||||
if (!(api && news && forum)) {
|
||||
if (!(api && newsProxy && forumProxy)) {
|
||||
throw new Error(`One or more locations are missing, all are required.
|
||||
|
||||
api: ${api}
|
||||
news: ${news}
|
||||
forum: ${forum}
|
||||
newsProxy: ${newsProxy}
|
||||
forumProxy: ${forumProxy}
|
||||
|
||||
`);
|
||||
}
|
||||
|
||||
return template
|
||||
.replace(apiPlaceholderRE, api)
|
||||
.replace(newsPlaceholderRE, news)
|
||||
.replace(forumPlacehilderRE, forum);
|
||||
.replace(newsPlaceholderRE, newsProxy)
|
||||
.replace(forumPlacehilderRE, forumProxy);
|
||||
};
|
||||
|
||||
/* eslint-disable max-len */
|
||||
|
Reference in New Issue
Block a user