Proxy'ing google docs document

export default {
async fetch(request, env, ctx) {
// URL of the Google Doc (make sure it's shareable and publicly accessible)
const googleDocUrl = 'https://docs.google.com/document/d/doc-id/view';

// Fetch the Google Doc and return as response
return fetch(googleDocUrl);
},
};
export default {
async fetch(request, env, ctx) {
// URL of the Google Doc (make sure it's shareable and publicly accessible)
const googleDocUrl = 'https://docs.google.com/document/d/doc-id/view';

// Fetch the Google Doc and return as response
return fetch(googleDocUrl);
},
};
I am trying to proxy a google document with cloudflare workers and I am getting this error, is what I am doing possible?
No description
6 Replies
Chaika
Chaika7mo ago
what exactly are you trying to do? Modern webpages are composed of a ton of extra resources, html is just the starting piece. Javascript, css, images, fetch requests, etc. More then likely Google Docs is trying to load the other resources from the same path and failing. They might even have protection against being proxied like that due to scammers and such, unlikely you'd be able to login for example.
soos
soosOP7mo ago
would embedding it be a better solution then?
Chaika
Chaika7mo ago
Using the publish to web stuff and iframing it? Quite possibly, although it depends on what you're trying to do/solve
soos
soosOP7mo ago
just trying to get a live updating resume thing thats on my domain from google docs
Chaika
Chaika7mo ago
do you update it that much? I would just export as pdf and link to it or something, but yea I'd go the embed/iframe way then https://support.google.com/docs/answer/183965?sjid=6509414300131048649-NA#embed_files&zippy=%2Cembed-a-document-spreadsheet-or-presentation
Want results from more Discord servers?
Add your server