简体   繁体   中英

Indirect ajax request via amazon S3

I've built a web app that makes request to a xml file that is on the internet. For now, my javascript is directly requesting to that url, but I was told it's not a safe practice. What I would need to do is have my bucket on S3 do itself the request to the xml file (cross-domain), then push the data to my javascript. S3 doesn't handle back-end, so do I need to set up something like heroku or EC2, or is it possible to manage that using S3?

Thanks.

Edit: Do you think tweaking CORS could work, or am I missing a step here? http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html

S3 just stores files. So yes, you would need some sort of back end kind of a 'middleware' or scraper, that does the job of grabbing the file and putting the data onto the S3 bucket.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM