View Single Post
Old 06-26-2017, 11:43 AM   #28
snoopy_1978
Member
snoopy_1978 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jun 2017
Device: Android
Another option I'm currently playing around witht is the "RequestHeader" directive in Apache.
With this it is possible to send / modify the AuhtorizatonHeader to the backend server (calibre in this case).
Technically this works, in the location "/calibre" I inserted

RequestHeader set Authorization "Basic <base64 encoded User:Pass String>"

And now after entering the correct LDAP credentials, calibre doesn't ask for a user, as apache send correct AuthHeaders to calibre now.

But now I had to decide somehow, which User:Pass String I have to send from Apache when user "Sandra" logs in or user "John".

Here again different Locations in Apache could help:
  • In Location "/calibre" one could use "RequestHeader" with the auth string of calibre User "NonAdult"
  • In Location "/calibre-all" one could use "RequestHeader" with auth string of calibre User "All"

But therefore, the "--url-prefix" option in calibre had to be removed and calibre had to determine the prefix automatically.
snoopy_1978 is offline   Reply With Quote