Help redirect http to https #4021
-
Hello, my website is using HTTPS and was successfully deployed from a build. However, in some cases, some of my users are unable to access it if they type the URL without HTTPS. Instead of redirecting to https://myawesomeapp.site, it becomes http://myawesome.site. My team, which includes one lecturer, thinks the problem is that they are using an old version of the browser. While we don't think asking users to update their browser is a solution, we are wondering if there is a solution from the code or server side. server.ts
I also tried using middleware, and it works if HTTPS is used. However, if HTTP is used, it is not redirecting. app/Middleware/RedirectToHttp.ts
sorry if there is a wrong word, i use translator |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@septiyadi396 hello, why are you not using Apache or Nginx to redirect URLs? What you are doing now is redirecting users just before sending the responses, while you need to do it before the requests hit your application. |
Beta Was this translation helpful? Give feedback.
@septiyadi396 hello, why are you not using Apache or Nginx to redirect URLs?
What you are doing now is redirecting users just before sending the responses, while you need to do it before the requests hit your application.