cinstitute
cinstitute
CDCloudflare Developers
Created by cinstitute on 2/24/2025 in #general-help
Cloudflared/Tunnels erroring out every couple of hours - leaves website unreachable
Hey yall I've forwarded a service to the web using Cloudflared/Tunnels at my domain (let's call it service.mywebsite.com). Everything has been running fine for months and then suddenly this morning my status page (hosted elsewhere) notified me that all of my services were not responding. Sure enough I could not reach my website. No error/cloudflare notice page they just never loaded. I restarted my machine and things went back to normal for a little bit then an hour or two later, same thing, everything goes down. I started investigating and noticed the local instances were responding with no issue (simple curl localhost:port/api/health endpoint). So I restarted Cloudflared (I use a docker container). Everything was back online and then an hour or two later exact same thing happens again. This time I grabbed the logs below During normal operation the usual cancelled errors, nothing crazy here.
2025-02-24T03:05:32Z ERR Request failed error="context canceled" connIndex=2 dest=https://service.mywebsite.com/api/realtime event=0 ip=[IP REDACTED] type=http
2025-02-24T03:05:32Z ERR error="context canceled" connIndex=1 event=1 ingressRule=4 originService=http://[IP REDACTED]:8090
2025-02-24T03:05:32Z ERR Request failed error="context canceled" connIndex=1 dest=https://service.mywebsite.com/api/realtime event=0 ip=[IP REDACTED] type=http
2025-02-24T03:06:07Z ERR error="context canceled" connIndex=0 event=1 ingressRule=4 originService=http://[IP REDACTED]:8090
2025-02-24T03:06:07Z ERR Request failed error="context canceled" connIndex=0 dest=https://service.mywebsite.com/api/realtime event=0 ip=[IP REDACTED] type=http
2025-02-24T03:06:25Z ERR error="context canceled" connIndex=2 event=1 ingressRule=4 originService=http://[IP REDACTED]:8090
2025-02-24T03:06:25Z ERR Request failed error="context canceled" connIndex=2 dest=https://service.mywebsite.com/api/realtime event=0 ip=[IP REDACTED] type=http
2025-02-24T03:05:32Z ERR Request failed error="context canceled" connIndex=2 dest=https://service.mywebsite.com/api/realtime event=0 ip=[IP REDACTED] type=http
2025-02-24T03:05:32Z ERR error="context canceled" connIndex=1 event=1 ingressRule=4 originService=http://[IP REDACTED]:8090
2025-02-24T03:05:32Z ERR Request failed error="context canceled" connIndex=1 dest=https://service.mywebsite.com/api/realtime event=0 ip=[IP REDACTED] type=http
2025-02-24T03:06:07Z ERR error="context canceled" connIndex=0 event=1 ingressRule=4 originService=http://[IP REDACTED]:8090
2025-02-24T03:06:07Z ERR Request failed error="context canceled" connIndex=0 dest=https://service.mywebsite.com/api/realtime event=0 ip=[IP REDACTED] type=http
2025-02-24T03:06:25Z ERR error="context canceled" connIndex=2 event=1 ingressRule=4 originService=http://[IP REDACTED]:8090
2025-02-24T03:06:25Z ERR Request failed error="context canceled" connIndex=2 dest=https://service.mywebsite.com/api/realtime event=0 ip=[IP REDACTED] type=http
continued below:
3 replies
CDCloudflare Developers
Created by cinstitute on 11/15/2024 in #pages-help
SvelteKit build causing MIME type errors on Cloudflare Pages with adapter. 500 Internal Error
Hey yall, not sure what is going on but my I've been trying to build my app for Cloudflare pages (which was working no more than a week ago) and suddenly my page deployments aren't loading. Console reveals the errors shown below. I have SSR turned off but that's about as much configuring as I've done to the build system (besides of course using the Cloudflare adapter for builds). Even weirder is that when I run npm run preview the local serving of the page works no problem. No idea what is causing this or how to fix it. Any ideas?
The resource from “https://[MYPAGE].pages.dev/_app/immutable/assets/0.DHByXPFT.css” was blocked due to MIME type (“”) mismatch (X-Content-Type-Options: nosniff).
[MYPAGE].pages.dev
Uncaught (in promise) Error: Unable to preload CSS for https://[MYPAGE].pages.dev/_app/immutable/assets/0.DHByXPFT.css
a Immutable
app.Blzu09J3.js:2:2608
Loading module from “https://[MYPAGE].pages.dev/_app/immutable/nodes/2.DINvMMQD.js” was blocked because of a disallowed MIME type (“”).
slushing300x.pages.dev
TypeError: error loading dynamically imported module: https://[MYPAGE].pages.dev/_app/immutable/nodes/2.DINvMMQD.js
The resource from “https://[MYPAGE].pages.dev/_app/immutable/assets/0.DHByXPFT.css” was blocked due to MIME type (“”) mismatch (X-Content-Type-Options: nosniff).
[MYPAGE].pages.dev
Uncaught (in promise) Error: Unable to preload CSS for https://[MYPAGE].pages.dev/_app/immutable/assets/0.DHByXPFT.css
a Immutable
app.Blzu09J3.js:2:2608
Loading module from “https://[MYPAGE].pages.dev/_app/immutable/nodes/2.DINvMMQD.js” was blocked because of a disallowed MIME type (“”).
slushing300x.pages.dev
TypeError: error loading dynamically imported module: https://[MYPAGE].pages.dev/_app/immutable/nodes/2.DINvMMQD.js
1 replies
CDCloudflare Developers
Created by cinstitute on 10/31/2024 in #general-help
Email worker forwarding emails twice?
hey yall. im attempting to set up a catch-all worker to forward "+" emails to their respective custom addresses. for example i have the custom address [email protected] forwarding to [email protected]. i wrote a worker to catch addresses like [email protected] and forward said email to [email protected]. the good news is it works! but maybe a little too much. all the emails are coming in twice at the same time. not sure what im doing wrong or if i have my setup weird. any ideas? note the emails used here are verified and i have both the catchall and my custom emails online.
export default {
async email(message, env, ctx) {
// Extract the local part and domain of the email address
const [localPart, domain] = message.to.split('@');

// List of existing custom addresses (anonymized)
const customAddresses = {
'alias1': '[email protected]',
'alias2': '[email protected]',
'support': '[email protected]',
};

// Only proceed if the local part contains a '+'
if (localPart.includes('+')) {
// Extract the base address (portion before the '+')
const baseAddress = localPart.split('+')[0];

// Check if the base address is in the custom addresses list
const destination = customAddresses[baseAddress];
if (destination) {
// Forward to the appropriate destination
await message.forward(destination);
} else {
// Reject if base address is not recognized
message.setReject(`No such address: ${baseAddress}@${domain}`);
}
}
}
}
export default {
async email(message, env, ctx) {
// Extract the local part and domain of the email address
const [localPart, domain] = message.to.split('@');

// List of existing custom addresses (anonymized)
const customAddresses = {
'alias1': '[email protected]',
'alias2': '[email protected]',
'support': '[email protected]',
};

// Only proceed if the local part contains a '+'
if (localPart.includes('+')) {
// Extract the base address (portion before the '+')
const baseAddress = localPart.split('+')[0];

// Check if the base address is in the custom addresses list
const destination = customAddresses[baseAddress];
if (destination) {
// Forward to the appropriate destination
await message.forward(destination);
} else {
// Reject if base address is not recognized
message.setReject(`No such address: ${baseAddress}@${domain}`);
}
}
}
}
4 replies