dimanche 5 juillet 2015

What should be allowed origin for AWS CORS for Cordova app

As per all the tutorials, to enable CORS on AWS S3 bucket, following configuration should be done. I have done this and it works for cordova app and works fine. Here, we are allowing - origin as - * which enables all the sites. How can I restrict it to only my cordova app developed in html5 for android/ ios. What should be the value in AllowedOrigin tag for cordova app to allow only my app to access the bucket.

<CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <AllowedMethod>GET</AllowedMethod>
        <MaxAgeSeconds>3000</MaxAgeSeconds>
        <ExposeHeader>ETag</ExposeHeader>
        <AllowedHeader>*</AllowedHeader>
        <AllowedHeader>Authorization</AllowedHeader>
    </CORSRule>




Aucun commentaire:

Enregistrer un commentaire