Skip to content

Instantly share code, notes, and snippets.

@tomprince
Created December 20, 2013 19:15
Show Gist options
  • Save tomprince/8059880 to your computer and use it in GitHub Desktop.
Save tomprince/8059880 to your computer and use it in GitHub Desktop.
diff --git a/src/hybridcluster/publicapi.py b/src/hybridcluster/publicapi.py
index eba0d9f..6c931c9 100644
--- a/src/hybridcluster/publicapi.py
+++ b/src/hybridcluster/publicapi.py
@@ -103,9 +103,11 @@ class PublicAPI(object):
given sitejuggler.
"""
portal = Portal(_Realm(), [AllowAnonymousAccess()])
+ root = Resource()
guarded = HTTPAuthSessionWrapper(portal, [])
+ root.putChild('v1', guarded)
endpoint = serverFromString(sitejuggler.clock, b"tcp:9880")
- service = StreamServerEndpointService(endpoint, Site(guarded))
+ service = StreamServerEndpointService(endpoint, Site(root))
service.name = cls.name
return service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment