Skip to content

Commit

Permalink
Merge pull request #449 from openstad/fix/wrong-config-reset-path
Browse files Browse the repository at this point in the history
fix: wrong /config-reset url (sometimes it had a double slash //)
  • Loading branch information
Badmuts committed Mar 29, 2024
2 parents 953069b + bff06e1 commit 742e1fc
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}`;
resetUrl += `${url.pathname}/config-reset`.replace('//', '/');
return fetch(resetUrl,{
headers: {
Host: url.hostname
}
Expand Down

1 comment on commit 742e1fc

@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:master-742e1fc

Please sign in to comment.