Document HTML5 CORS restrictions in HTTPClient and HTTPRequest

See https://github.com/godotengine/godot/issues/40247.

(cherry picked from commit 90db42d9db)
This commit is contained in:
Hugo Locurcio
2020-07-20 15:12:36 +02:00
committed by Rémi Verschelde
parent f922452e90
commit 7078d33fa1
2 changed files with 2 additions and 0 deletions

View File

@@ -64,6 +64,7 @@
add_child(texture_rect)
texture_rect.texture = texture
[/codeblock]
[b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link>