mirror of
https://github.com/godotengine/godot.git
synced 2025-04-13 01:00:35 +08:00
Document secure wss:// caveats for WebSocketClient
See https://github.com/godotengine/godot/issues/37739. (cherry picked from commit a56e37545bec0390784cab2efccbaa985a685eae)
This commit is contained in:
parent
9b928cbd9e
commit
cd4906ee0b
@ -28,6 +28,7 @@
|
||||
If [code]true[/code] is passed as [code]gd_mp_api[/code], the client will behave like a network peer for the [MultiplayerAPI], connections to non-Godot servers will not work, and [signal data_received] will not be emitted.
|
||||
If [code]false[/code] is passed instead (default), you must call [PacketPeer] functions ([code]put_packet[/code], [code]get_packet[/code], etc.) on the [WebSocketPeer] returned via [code]get_peer(1)[/code] and not on this object directly (e.g. [code]get_peer(1).put_packet(data)[/code]).
|
||||
You can optionally pass a list of [code]custom_headers[/code] to be added to the handshake HTTP request.
|
||||
[b]Note:[/b] To avoid mixed content warnings or errors in HTML5, you may have to use a [code]url[/code] that starts with [code]wss://[/code] (secure) instead of [code]ws://[/code]. When doing so, make sure to use the fully qualified domain name that matches the one defined in the server's SSL certificate. Do not connect directly via the IP address for [code]wss://[/code] connections, as it won't match with the SSL certificate.
|
||||
[b]Note:[/b] Specifying [code]custom_headers[/code] is not supported in HTML5 exports due to browsers restrictions.
|
||||
</description>
|
||||
</method>
|
||||
|
Loading…
x
Reference in New Issue
Block a user