Cannot get yubikey working

The hostname matches. The only thing is, the instance is behind an nginx proxy, so it may well be that the problem is here. However the proxy configuration is effectively SSL offload, so it’s a case of:

Web Browser → Nginx proxy (https) → Discourse (http)

So the connection between the browser and nginx is HTTPS, but between the proxy and discourse it’s on port 80.

I did just enable CORS on my lab machine that I had setup, as I also had the problem here, but it wasn’t until I did full HTTPS with CORS that I could register my Yubikey. Force SSL was also enabled as well.

I did put both http and https in the COR config in discourse for the one behind the proxy, but it didn’t make any difference. So I think it’s potentially down to the nginx proxy config, or I may need to move it from proxying between 443 and port 80, to proxy to port 443 on discourse instead.