How to show an image which is secured by http authentication

前端 未结 2 1428
猫巷女王i
猫巷女王i 2021-01-02 16:01

How can i show an image from a server with standard http protection without showing the authentication window?

I now use standard html



        
2条回答
  •  被撕碎了的回忆
    2021-01-02 16:21

    This should work. Simply replace the username and password with your authentication details. (Warning: Doesn't work in all browsers)

    
    

    I would recommend putting this in a separate file on your server. That way you can reference it without exposing the authentication info.

提交回复
热议问题