Skip to content

Commit

Permalink
Remove custom header that caused CORS error in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
hoel committed Nov 7, 2025
1 parent 17f06d4 commit 1bd7a43
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1021,11 +1021,7 @@
async function fetchWeatherFromYr(latitude, longitude) {
try {
const url = `https://api.met.no/weatherapi/nowcast/2.0/complete?lat=${latitude}&lon=${longitude}`;
const response = await fetch(url, {
headers: {
'User-Agent': 'WebClock/1.0 (Educational Project)'
}
});
const response = await fetch(url);

if (!response.ok) {
throw new Error(`Weather API error: ${response.status}`);
Expand Down

0 comments on commit 1bd7a43

Please sign in to comment.