Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong /config-reset url (sometimes it had a double slash //) #449

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/cms/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ app.set('trust proxy', true);
async function restartAllSites() {
const sites = Object.keys(aposServer);
const promises = sites.map(site => {
const url = new URL('http://' + site);
return fetch(`http://localhost:${process.env.PORT}${url.pathname}/config-reset`,{
const url = new URL('http://' + site);
let resetUrl = `http://localhost:${process.env.PORT}${url.pathname}/config-reset`;
resetUrl = resetUrl.replace('//', '/');
Badmuts marked this conversation as resolved.
Show resolved Hide resolved
return fetch(resetUrl,{
headers: {
Host: url.hostname
}
Expand Down