Can I make my site secure?
If yes, how this can be done.
If you mean secure in the sense of https then just type that it’s automatically active. If you mean passwords, tokens and such you’ll need to put in the level of effort you think is worthwhile.
I found the solution:
if (location.hostname == ‘<project_name>.glitch.me’ && location.protocol != ‘https:’) {
location.href = ‘https:’ + window.location.href.substring(window.location.protocol.length);
}
Hi Dmitry. We didn’t understand that was what you wanted to do but I will point that is not the solution you want to use. This is something you’ve decided to add to client-side right, i.e. it happens in the browser?
That isn’t safe and secure. What you want to look up is server-side redirection and since (I think) you are using Express perhaps this example will help.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.