webui custom subfolder access without password
Added by Gyuri Vajda about 9 years ago
Hi,
I made a directory inside /usr/share/tvheadend/src/webui/static/ called test.
Is it possible to access only to this subfolder like (http://localhost:9981/static/test/index.html) without entering username and password?
I tried to add a .htaccess file with "Satisfy Any" & "Require all granted", but it's not working. Probably because its not an Apache?
How can I make it?
Thanks,
Gyuri
Replies (8)
RE: webui custom subfolder access without password - Added by Mark Clarkstone about 9 years ago
Gyuri Vajda wrote:
Hi,
I made a directory inside /usr/share/tvheadend/src/webui/static/ called test.
Is it possible to access only to this subfolder like (http://localhost:9981/static/test/index.html) without entering username and password?
I tried to add a .htaccess file with "Satisfy Any" & "Require all granted", but it's not working. Probably because its not an Apache?
How can I make it?
Thanks,
Gyuri
Unfortunately Tvheadends webserver does not use .htaccess files so this isn't possible.
RE: webui custom subfolder access without password - Added by Gyuri Vajda about 9 years ago
Is there any other way to exclude a folder from password protection?
I've seen that users and their permissions stored inside /home/hts/.hts/tvheadend/accesscontrol
But I didn't get any further.
RE: webui custom subfolder access without password - Added by Mark Clarkstone about 9 years ago
The only way I can think of would be to create a catch all user (*) and only allow web access, but people would still be able to see the epg guide and status tabs.
RE: webui custom subfolder access without password - Added by Gyuri Vajda about 9 years ago
Thank you Mark! It works, as you wrote. This is a great solution!
To make it better, I think we should modify http.c or webui.c like: If the requested path is ... then do not check for permissions.
But I am not so expert to find it where it is handled.
Anyway, thanks for your help. If somebody could suggest me what should I modify and how, I'll appreciate it. Just for curiosity
Thanks again,
Gyuri
RE: webui custom subfolder access without password - Added by Prof Yaffle about 9 years ago
If you can describe what you'd need then you can always raise a feature request... there's likely to be an interface revamp after the next stable release, so it could be considered, at least.
Maybe it's a case of having a .../custom/<pages>.html section, and a check box that says "Apply access control to custom pages", something like that.
What's the ultimate goal? To use tvheadend's internal web server for local clients instead of e.g. Apache? That would help understand the usefulness and options.
RE: webui custom subfolder access without password - Added by Gyuri Vajda about 9 years ago
Yes, this would be the goal. To keep the system lightweight as possible and make a very simple ui for my friends.
I installed apache, but it was not enough. I must install php too, because I couldn't use tvheadend's json responses. The same origin policy not allowed it. Same oringin policy applies to different ports too, so I read the json with php, and send it to the client through apache.
Maybe it would be a good feature, to ask tvh webserver to read a .something file in the requested folder, where you can set basic rules, like in .htaccess. Or the solution what you mentioned would be good too!
Where can I raise a feature request? I'll give it a try.
RE: webui custom subfolder access without password - Added by Prof Yaffle about 9 years ago
At the top of this page, "New Issue", tracker type = feature.
I don't know if it would fly - tvheadend is intended as a lightweight TV server and PVR, not a full-blown web server - but perhaps something like the above is a minor enough consideration.
RE: webui custom subfolder access without password - Added by Mark Clarkstone about 9 years ago
Gyuri Vajda wrote:
Yes, this would be the goal. To keep the system lightweight as possible and make a very simple ui for my friends.
I installed apache, but it was not enough. I must install php too, because I couldn't use tvheadend's json responses. The same origin policy not allowed it. Same oringin policy applies to different ports too, so I read the json with php, and send it to the client through apache.
Maybe it would be a good feature, to ask tvh webserver to read a .something file in the requested folder, where you can set basic rules, like in .htaccess. Or the solution what you mentioned would be good too!
Where can I raise a feature request? I'll give it a try.
Tvheadend dev code (4.1) has a HTTP CORS origin option, might be something to look into