I am running a bottle-based server application, for which I
want to protect some of the routes with basic authentication. Thus I
added the bottle.auth_basic decorator like this:
def auth_check(username, password):
return username == USERNAME and password == PASSWORD
def setRoutes():
self.route('/admin', 'GET', route_admin)
@bottle.auth_basic(auth_check)
def route_admin():
print "Admin called."
So when I start the server and connect to it on the same machine
(localhost), then its working fine. As soon as I try to access the /admin
page I see the proper authentication dialog and I can only access that
page when I enter the correct authentication credentials.
However, it does not work when I try to connect to that page from a
remote machine. In that case I do not even see the auth. dialog, instead
I directly get a 401 page from bottle.
The IP addresses etc. are exactly the same in both cases. In the second case I simply connect from a remote machine instead of the same machine.
Any ideas what I could be missing here?
PS: I am running bottle version 0.11.6
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.