Skip to content

Commit 0c0b548

Browse files
committed
maybe i fixed stuff idrek anymore
1 parent 087a7f2 commit 0c0b548

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/lib/types/servers.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ export const findSingleServer = async (): Promise<Server | null> => {
7777
return servers && servers.length > 0 ? servers[0] : null;
7878
} else {
7979
// For HTTP sites, use the proxy endpoint
80-
const response = await fetch("https://z67jfipy20.execute-api.us-west-2.amazonaws.com/prod/servers/game");
80+
const response = await fetch("https://z67jfipy20.execute-api.us-west-2.amazonaws.com/prod/servers/game", {
81+
mode: "cors"
82+
});
8183
if (!response.ok) {
8284
return null;
8385
}
@@ -112,7 +114,9 @@ export const findServers = async (): Promise<Server[] | null> => {
112114
// Fetch both in parallel
113115
const fetches = [
114116
fetch(localUrl).catch(() => null),
115-
fetch(proxyUrl).catch(() => null)
117+
fetch(proxyUrl, {
118+
mode: "cors"
119+
}).catch(() => null)
116120
];
117121

118122
const [localRes, proxyRes] = await Promise.all(fetches);

src/routes/play/+page.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@
332332
></script>
333333
</svelte:head>
334334

335-
{#if adblock && !continued && !isAHost}
335+
336+
{#if adblock && !continued && !isAHost && adContinued}
336337
<div class="container">
337338
<div class="adblock-warning">
338339
<h2>Ad Blocker Detected</h2>

0 commit comments

Comments
 (0)