My Audits in Chrome are showing me a net::ERR_EMPTY_RESPONSE because Lighthouse was unable to reliably load the page I requested. Google developers is giving me the suggestion to configure my server (node.js?) to redirect from http to https.
I tried the react module "react-https-redirect", but still not passing the audit. I implemented the module like so:
render() {
return (
<HttpsRedirect>
<App />
</HttpsRedirect>
);
}
What do I have to configure to realise the automatic redirection?
My Audits in Chrome are showing me a net::ERR_EMPTY_RESPONSE because Lighthouse was unable to reliably load the page I requested. Google developers is giving me the suggestion to configure my server (node.js?) to redirect from http to https.
I tried the react module "react-https-redirect", but still not passing the audit. I implemented the module like so:
render() {
return (
<HttpsRedirect>
<App />
</HttpsRedirect>
);
}
What do I have to configure to realise the automatic redirection?
Share Improve this question edited May 24, 2019 at 9:24 Eddie 26.9k6 gold badges38 silver badges59 bronze badges asked May 24, 2019 at 9:24 KurgerBingKurgerBing 1931 gold badge5 silver badges16 bronze badges 3- 1 It's because you need to configure the server. What kind of application is it? In .NET we have IIS manager on the server that handles redirects. It's up to your server really – Jabberwocky Commented May 24, 2019 at 9:29
- It's running on node – KurgerBing Commented May 24, 2019 at 10:27
- 1 Then configure node to redirect to wherever you want it to, not react because of security issues. Check the answer underneath – Jabberwocky Commented May 24, 2019 at 10:28
1 Answer
Reset to default 3Answer is here you should use react-https-redirect but as the author says there is some security issues with this. if you can configure the server or use nginx as gateway that would be better than using this module.