I have a web app that is written in ReactJS and server rendered using NextJS. It works fine on all browsers but when I open it in Android webView, all my requests are blocked citing the reason "csp:blocked" as shown in the screenshot below.
I haven't specified any CSP policy of my own.
Here's my next.config
/**
* Disable public routes from "pages" folder.
*/
useFileSystemPublicRoutes: false,
/**
* Change "__next" directory path.
*/
assetPrefix: '/store/__js',
webpack: (config) => {
config.output.publicPath = `/store/__js${config.output.publicPath}` // eslint-disable-line no-param-reassign
return config
},

Faced exactly the same issue, you need to do some changes in WebView settings on Android side.
WebSettings webSettings = yourWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setDomStorageEnabled(true);
yourWebView.loadUrl("yourWebUrl");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With