diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index bd1bb95..918ca90 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -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")