AddWebUIWhitelist: Difference between revisions

From Onset Developer Wiki
(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...")
 
No edit summary
 
Line 24: Line 24:
AddWebUIWhitelist("akamaized.net")
AddWebUIWhitelist("akamaized.net")
</syntaxhighlight>
</syntaxhighlight>
[[File:AddWebUIWhitelist_Example.PNG|1000px]]


{{RelatedFunctions}}
{{RelatedFunctions}}

Latest revision as of 17:47, 21 January 2021

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