Optional hostname and port
All checks were successful
Build Base Application / Build (push) Successful in 1m32s
All checks were successful
Build Base Application / Build (push) Successful in 1m32s
This commit is contained in:
parent
6ee266d3ac
commit
e3b70d8a51
@ -38,8 +38,12 @@ class BaseApplication(web.Application):
|
||||
middlewares.append(self.session_middleware)
|
||||
super().__init__(middlewares=middlewares, *args, **kwargs)
|
||||
|
||||
|
||||
def run(self, *args, **kwargs):
|
||||
web.run_app(self, *args, **kwargs)
|
||||
if kwargs.get('port'):
|
||||
if not kwargs.get('host'):
|
||||
kwargs['host'] = '127.0.0.1'
|
||||
web.run_app(self, *args, **kwargs)
|
||||
|
||||
async def authenticate(self, username, password):
|
||||
return self.basic_username == username and self.basic_password == password
|
||||
|
Loading…
Reference in New Issue
Block a user