Skip to content

Commit

Permalink
Add is_web func
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangSenff authored Mar 26, 2024
1 parent 5317bb4 commit 8fd98ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions addons/godot-firebase/Utilies.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ static func get_json_data(value):
# This appears to be caused by the gzip compression being unsupported, so we
# disable it when web export is detected.
static func fix_http_request(http_request):
if OS.get_name() == "HTML5" or OS.get_name() == "Web":
http_request.accept_gzip = false
if is_web():
http_request.accept_gzip = false

static func is_web() -> bool:
return OS.get_name() in ["HTML5", "Web"]

0 comments on commit 8fd98ed

Please sign in to comment.