Eli
Eli
CDCloudflare Developers
Created by Eli on 8/14/2024 in #workers-help
Email Worker to webhook POST fetch not working in production
That worked, thank you so much!
15 replies
CDCloudflare Developers
Created by Eli on 8/14/2024 in #workers-help
Email Worker to webhook POST fetch not working in production
I’m still having this issue. Does someone have an idea?
15 replies
CDCloudflare Developers
Created by Eli on 8/14/2024 in #workers-help
Email Worker to webhook POST fetch not working in production
export default {
async email(message, env, ctx) {
let arrayBuffer = await new Response(message.raw).arrayBuffer()
await fetch('https://some.url/post', {
body: arrayBuffer,
method: 'POST',
headers: {
'email-to': message.to,
'email-from': message.from,
'Authorization': env.AUTH
}
})
}
}
export default {
async email(message, env, ctx) {
let arrayBuffer = await new Response(message.raw).arrayBuffer()
await fetch('https://some.url/post', {
body: arrayBuffer,
method: 'POST',
headers: {
'email-to': message.to,
'email-from': message.from,
'Authorization': env.AUTH
}
})
}
}
Got this atm. Been trying to get it to work all day, I just can't seem to. Works in test env, doesn't in production: Too many redirects
15 replies
CDCloudflare Developers
Created by Eli on 8/14/2024 in #workers-help
Email Worker to webhook POST fetch not working in production
If I transfer message.raw to not be a stream, i get "Too many redirects.", even tho I don't receive any incoming requests on the webhook and don't have any redirects configured anywhere. (And it also simply works in the test environment, but doesn't in production.)
"exceptions": [
{
"name": "TypeError",
"message": "Too many redirects.",
"timestamp": 1723667379942
}
],
"exceptions": [
{
"name": "TypeError",
"message": "Too many redirects.",
"timestamp": 1723667379942
}
],
15 replies
CDCloudflare Developers
Created by Eli on 8/14/2024 in #workers-help
Email Worker to webhook POST fetch not working in production
i think it doesn't like message.raw, how do i handle it properly?
15 replies
CDCloudflare Developers
Created by Eli on 8/14/2024 in #workers-help
Email Worker to webhook POST fetch not working in production
Chinese to me tbh
15 replies
CDCloudflare Developers
Created by Eli on 8/14/2024 in #workers-help
Email Worker to webhook POST fetch not working in production
"exceptions": [
{
"name": "TypeError",
"message": "A request with a one-time-use body (it was initialized from a stream, not a buffer) encountered a redirect requiring the body to be retransmitted. To avoid this error in the future, construct this request from a buffer-like body initializer.",
"timestamp": 1723663558233
}
],
"exceptions": [
{
"name": "TypeError",
"message": "A request with a one-time-use body (it was initialized from a stream, not a buffer) encountered a redirect requiring the body to be retransmitted. To avoid this error in the future, construct this request from a buffer-like body initializer.",
"timestamp": 1723663558233
}
],
15 replies
CDCloudflare Developers
Created by Eli on 8/14/2024 in #workers-help
Email Worker to webhook POST fetch not working in production
(how do i actually do that :) Nvm I think I found it at Real time logs
15 replies