sigoden / dufs

A file server that supports static serving, uploading, searching, accessing control, webdav...
Other
5.45k stars 259 forks source link

how to put the dufs page with Login information into iframe by URL #370

Closed hjx620 closed 3 months ago

hjx620 commented 3 months ago

Specific Demand

put the page into iframe without Login

my dufs ip is http://192.168.5.67:32381. I want to embed the dufs page into another page without login.

I have url,which is http://admin:admin@192.168.5.67:32381. But the url with username and password is not identified by iframe. I must login with enter ing my username and password by my hand. I want to put username and password in the url,which can be identified by iframe.what should i do? thank you.

Implement Suggestion

hjx620 commented 3 months ago

how can i put the username and password into the URL effectively?

mmexport1710901107600

sigoden commented 3 months ago

All basic auth related behaviors are controlled by the browser. There's nothing dufs can do.

It is not safe to expose username and password on the front end.

Instead of setting the username and password and having it show up in the url, why not set read-only permissions on the directory via the auth control.