add websocket scheme in request
This commit is contained in:
parent
7d9de068d9
commit
3af26540ec
|
@ -142,6 +142,10 @@ class Request(dict):
|
|||
|
||||
@property
|
||||
def scheme(self):
|
||||
if self.app.websocket_enabled \
|
||||
and self.headers.get('upgrade') == 'websocket':
|
||||
return 'ws'
|
||||
|
||||
if self.transport.get_extra_info('sslcontext'):
|
||||
return 'https'
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user