Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Aug 26, 2024
1 parent 622fa86 commit fc4dca0
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions buildtools/check-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,18 @@ function loaded(page, browser) {
request.headers().origin = 'http://localhost:3001';
}
console.log(`Request: ${url}`);
request.continue({
url,
headers: {
// Don't be intranet
'Forwarded': 'for=8.8.8.8;proto=https',
'Cache-Control': 'no-cache',
},
});
if (url.startsWith('http://localhost:') && url.endsWith('/theme/favicon.ico')) {
request.respond(OSMImage);
} else {
request.continue({
url,
headers: {
// Don't be intranet
'Forwarded': 'for=8.8.8.8;proto=https',
'Cache-Control': 'no-cache',
},
});
}
}
} else if (
url.includes('tile.openstreetmap.org') ||
Expand All @@ -209,8 +213,6 @@ function loaded(page, browser) {
url.startsWith('https://ows4.asitvd.ch/')
) {
request.respond(OSMImage);
} else if (url.startsWith('http://localhost') && url.endsWith('/theme/favicon.ico')) {
request.respond(OSMImage);
} else {
console.log(`Abort request on '${url}'`);
request.abort('failed');
Expand Down

0 comments on commit fc4dca0

Please sign in to comment.