Skip to content

Commit

Permalink
fix: wrong /config-reset url (sometimes it had a double slash //)
Browse files Browse the repository at this point in the history
  • Loading branch information
Badmuts committed Mar 29, 2024
1 parent 953069b commit 41e5482
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/cms/app.js
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('//', '/');
return fetch(resetUrl,{
headers: {
Host: url.hostname
}
Expand Down

1 comment on commit 41e5482

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Published new image: openstad/frontend:fix-wrong-config-reset-path-41e5482

Please sign in to comment.