HTTP mount with username and password

I just have a general question. I want to mount a HTTP file site that is behind basic authentication using the Caddy server. How can I securely pass my login credentials so that it logs in when I mount it on my local machine?

Right now I'm using: https://username:password@url.site

This doesn't seem secure. Please help if you can and correct me if I'm wrong.

HTTP isn't secure.

No way around that.