RedirectToHttps": "true" not redirecting?

I have setup two instances and configures SSL to be used like below, however the RedirectToHttps does not work when browsing http://localhost:5000 on both instances. What is actually needed to get it to work?

“C:\ProgramData\PowerShellUniversal\appsettings.json”
{
“Kestrel”: {
“Endpoints”: {
“HTTPS”: {
“Url”: “https://*:443”,
“Certificate”: {
“Subject”: “%SERVERNAME%”,
“Store”: “My”,
“Location”: “LocalMachine”,
“AllowInvalid”: “true”

     }
  }
}

},
“Plugins”: [
“UniversalAutomation.LiteDBv5”
],
“Data”: {
“RepositoryPath”: “%ProgramData%\UniversalAutomation\Repository”,
“ConnectionString”: “%ProgramData%\UniversalAutomation\database.db”
},
“RedirectToHttps”: “true”
}

And in “C:\Program Files (x86)\Universal\appsettings.json”:
{
“Kestrel”: {
“Endpoints”: {
“HTTP”: {
“Url”: “http://*:5000”
}
},
“RedirectToHttps”: “false”,
“UseHttpSys”: “false”,
“BasePath”: “”,
“Hsts”: {
“MaxAgeDays”: 365
},
“CookiePolicy”: “”
},
“ApplicationInsights”: {
“InstrumentationKey”: “”
},

Unless I’m misunderstanding how your setup is, on the :5000 setup you have redirect to https set to false and no https configured.

My setup only uses the programdata json, and not the programfiles one as well.

The issue with RedirectToHttps is that it only changes the protocol and not also the port. So, if you go to http://<psuwebsite>:5000 it would only redirect you to https://<psuwebsite>:5000 rather than https://<psuwebsite>:443. As you have your HTTPS endpoint defined to be on 443, the RedirectToHttps property won’t work.

Maybe this is a bug, and not by design, because I don’t see why it wouldn’t also take ports into consideration.

Yeah thats true
If i change
“RedirectToHttps”: “True”,
“UseHttpSys”: “True”,
The service is started but website is not accessible.

If i edit like:
“RedirectToHttps”: “True”,
“UseHttpSys”: “false”,
The HTTPS redirect actually works now if i use Port 5000 and 443.