CulturalMe / meteor-slingshot

Upload files directly to AWS S3, Google Cloud Storage and others in meteor
MIT License
595 stars 104 forks source link

Android Slingshot Fails - preflight request doesn't pass access control check #155

Open ildr3him opened 8 years ago

ildr3him commented 8 years ago

Using very basic meteor slingshot code. It runs fine on Chrome on OS X but when i run the app on my android device I always get:

Error uploading I20151219-14:17:45.779(1) (android:http://meteor.local/:0) XMLHttpRequest cannot load https://mybucket.s3-eu-central-1.amazonaws.com/. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://meteor.local' is therefore not allowed access. The response had HTTP status code 404.

I already checked my Bucket and User Policies but I can't find a reason why this works in Browser but not on a Mobile device. Anyone hints as to how I can get this to work?

ildr3him commented 8 years ago

Adding App.accessRule("*"); to the mobile-config.js did the trick. Apparently Meteor doesn't set this to default anymore due to a security issue