react-native-static-server icon indicating copy to clipboard operation
react-native-static-server copied to clipboard

Use custom http headers

Open StanislavMayorov opened this issue 5 years ago • 2 comments

Hi. Is it possible to add custom http headers? I want to add Access-Control-Allow-Origin: * to server response.

StanislavMayorov avatar Jul 26 '19 15:07 StanislavMayorov

Hi, this problem is solved. I have the same needs

luojiong avatar Oct 20 '20 02:10 luojiong

I believe that if you serve your files using react-native-webview, you can set the custom headers, as well as cookies, from there: https://github.com/react-native-webview/react-native-webview/blob/master/docs/Guide.md#working-with-custom-headers-sessions-and-cookies

c-emil avatar Jan 04 '22 13:01 c-emil