2

I'm trying to set up a WebView to essentially hit a QA server configured with Apache authorization when my application is running in development mode. According to the React Native documentation, I'm able to pass headers as a prop to a WebView component like this:

<WebView source={{uri: "http://example.com", headers: {Authorization: "Basic dXNlcm5hbWU6cGFzc3dvcmQ="}}}/>

When I run this on Android with the proper values, I am granted access to the page as expected. On iOS, however, I simply receive a blank screen.

Am I missing something here or is this a bug in React Native? In the latter case, does anybody know of a simple workaround for this scenario?

4

0 回答 0