Skip to content

Commit

Permalink
Fix Astro.url.origin returns 'locahost:3000'
Browse files Browse the repository at this point in the history
Fix Astro.url.origin returns 'locahost:3000'
  • Loading branch information
pkong-ds authored May 31, 2024
2 parents 98c4e59 + 9536409 commit db2d815
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/pages/device/[device].astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ const redirectTo = redirect[`/device/${targetDevice}`];
---

<head>
<meta
http-equiv="refresh"
content=`0; url="${Astro.url.origin}${redirectTo}"`
/>
<script define:vars={{ redirectTo }}>
window.location.replace(`${window.location.origin}${redirectTo}`);
</script>
</head>

0 comments on commit db2d815

Please sign in to comment.