If you are using nginx, it should be set like this:

appsettings.json -> HostingConfig ->
"UseProxy": true,
"ForwardedProtoHeaderName": null

This is very important to set it to null. For some reason it is empty string by default.
Setting it to null will default to 'X-Forwarded-Proto'.

After that you need to: `update nopkms.store set sslenabled = true`