Anthonyzou / react-native-image-zoom

Image pan and zoom for Android
https://www.npmjs.com/package/react-native-image-zoom
MIT License
115 stars 52 forks source link

Does not passes the cookies when loading an image #32

Open akki-ng opened 7 years ago

akki-ng commented 7 years ago

My service is backed by authentication which uses session id to check validity of session which was authenticated using CAS. In this scenario, CAS sets up some cookies so that future request are authenticated.

For this setup using default "Image" module from react native works, but while using Image from "react-native-image-zoom" throws an unauthenticated exception in backend.

Somebody please reproduce the issue and confirm.

Anthonyzou commented 7 years ago

can you set the cookie header in the image request

<Image
  source={{
    uri: '...',
    headers: {
      "cookie" : ...'
    }
  }}>
</Image>
akki-ng commented 7 years ago

@Anthonyzou Thanks, I'll try this, but is there any way by which Image module picks up cookies for the same domain automatically. Because the default Image module is able to do so. If this happens automatically, it will be a relief. Thanks.

cbjs commented 7 years ago

set cookie header not working