Skip to content

Allow remote content in local CEF browsers with approved domains #5281

Description

@FileEX

Is your feature request related to a problem? Please describe.

Currently, MTA does not allow local browser instances to access remote content. This is fine for preventing local browsers from loading arbitrary remote pages, but the restriction also prevents them from loading remote assets such as images, even when the domain is explicitly allowed through requestBrowserDomains.

For example, when building a UI with React, I need to execute my own JavaScript through executeBrowserJavascript. A vehicle or object browser is a simple example: it may contain several thousand images that can be displayed almost instantly by a regular browser, but fetching all of them through fetchRemote would take a significant amount of time. Bundling thousands of images with the resource is also impractical.

Describe the solution you'd like

I propose slightly relaxing this restriction so that local browsers can load remote resources, such as images, when the corresponding domain has been explicitly allowed through requestBrowserDomains.

This would still prevent local browsers from navigating to arbitrary remote pages while allowing them to use approved remote assets. It should not introduce a meaningful security risk, since loading an image or other static resource does not provide the page with capabilities beyond what could already be done through the browser's developer console.

Describe alternatives you've considered

No response

Additional context

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions