I need to read data from google spreadsheet. But stumbled on the CORS problem. I was recommended to use Amazon as a CORS gateway between google spreedsheet and my external page. I've set everything up with serverless and solved the CORS problem between my page and amazon by setting
"Access-Control-Allow-Origin" : "*", // Required for CORS support to work
"Access-Control-Allow-Credentials" : true // Required for cookies, authorization headers with HTTPS
in handler.js for my respone parameter.
So far a simple hello function works fine.
But now I want to do the second and most important part. Read the data from google spreadsheet so I can pass it on. So is it possible to do that? Is there some settings or code that can be used as a work around for the fact that google doesn't send proper headers?
I've so far only tried a simple https.get to retrieve the data, but get CORS problem.
Make changes at google is not an option. The url for the spreadsheet is dynamic and set by the user as input.