react-native-webview: Referer header is not passing to request
I have private vimeo video. It restricted by domain-level privacy
It works if request contains Referer
header, but seems like react-native-webview
not pass it

So I receive error on trying to play protected video
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 38 (2 by maintainers)
hi @indapublic , @sibelius . Could we implement by this way:
edit RNCWebViewManager.java like this
@Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.contains(“https://wx.tenpay.com”)){ Map<String,String> map=new HashMap<String, String>(); map.put(“Referer”, “https://www.reactnative.com”); view.loadUrl(url,map); return true; } dispatchEvent( view, new TopShouldStartLoadWithRequestEvent( view.getId(), createWebViewEvent(view, url))); return true; }