forked from cswimr/SeaCogs
fix(pterodactyl): set origin header through websockets.connect and not through extra_headers
This commit is contained in:
parent
b7635f06f5
commit
caa03a63e6
1 changed files with 1 additions and 5 deletions
|
@ -34,10 +34,6 @@ class Pterodactyl(commands.Cog):
|
|||
api_key = await self.config.api_key()
|
||||
server_id = await self.config.server_id()
|
||||
|
||||
extra_headers = {
|
||||
"origin": base_url
|
||||
}
|
||||
|
||||
try:
|
||||
client = PterodactylClient(base_url, api_key, debug=True).client
|
||||
websocket_credentials = client.servers.get_websocket(server_id)
|
||||
|
@ -49,7 +45,7 @@ class Pterodactyl(commands.Cog):
|
|||
self.logger.error('Failed to retrieve Pterodactyl websocket: %s', e)
|
||||
return
|
||||
|
||||
async for websocket in websockets.connect(websocket_credentials['data']['socket'], extra_headers=extra_headers):
|
||||
async for websocket in websockets.connect(websocket_credentials['data']['socket'], origin=base_url):
|
||||
try:
|
||||
self.logger.debug("WebSocket connection established")
|
||||
|
||||
|
|
Loading…
Reference in a new issue