AddWebUIWhitelist

From Onset Developer Wiki
Revision as of 17:44, 21 January 2021 by BlueMountains (talk | contribs) (Created page with "{{Info|Function|Server|1.4.2}} {{FuncDescription|Adds a domain to the remote WebUI whitelist. Only domain names with a top level domain (TLD) can be whitelisted. When a play...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
AddWebUIWhitelist

Type: Function
Context: Server
Introduced: v1.4.2

Description

Adds a domain to the remote WebUI whitelist. Only domain names with a top level domain (TLD) can be whitelisted.

When a player connects they will be asked to allow the domain names. Players can also reject the request.

This function can be called from the index.lua or any other package script.

Syntax

AddWebUIWhitelist(domain)

Parameters

  • domain
    The domain to whitelist. Example: vimeo.com

Return Value

  • Returns true on success.

Example

--index.lua
AddWebUIWhitelist("vimeo.com")
AddWebUIWhitelist("vimeocdn.com")
AddWebUIWhitelist("firebaseio.com")
AddWebUIWhitelist("sentry-cdn.com")
AddWebUIWhitelist("vimeo.magisto.com")
AddWebUIWhitelist("akamaized.net")

See also