Browser
The in-phone Browser renders external web pages inside the NUI via an iframe. A whitelist controls which URLs are allowed to load, preventing abuse.
- Address bar with URL input and navigation
- Back / forward / refresh buttons
- Tabs — open multiple pages simultaneously
- Bookmarks — save and organize favourite sites
- Browsing history with search
- Link previews on hover
- URL whitelist enforced server-side
URL whitelist
Configure allowed domains in server/custom/browser.lua:
lua
QuanticBrowser = {
whitelist = {
"youtube.com",
"twitch.tv",
"fivem.net",
"cfx.re",
"yourserver.com",
},
-- allow all subdomains automatically
includeSubdomains = true,
}Do not add
* or leave the whitelist empty — this would allow players to load arbitrary sites, which is a security risk in a NUI context.IsURLAllowed export
Check whether a URL is on the whitelist from any server-side script:
lua
local allowed = exports.quanticPhone:IsURLAllowed("https://youtube.com/watch?v=abc")
if allowed then
print("URL is safe to load")
end
-- Also available for upload domain checks:
local uploadOk = exports.quanticPhone:IsUploadDomainAllowed("cdn.fivemanage.com")