Skip to content

Conversation

@devrushit
Copy link

Summary

  • Register moz-extension URI scheme in UriFactory, following the existing pattern for capacitor and chrome-extension
  • Firefox browser extensions send requests with Origin: moz-extension://... headers, which causes Laminas\Uri\Exception\InvalidArgumentException: no class registered for scheme "moz-extension" in the request logger, crashing the proxy

Context

When a Firefox extension makes HTTP requests through an Expose tunnel, the browser automatically sets the Origin header to moz-extension://<extension-id>. The Laminas UriFactory doesn't have a handler for this scheme, so LoggedRequest::getRequestHeaders() throws an uncaught exception that prevents the request from being proxied.

The fix is a single line, consistent with how capacitor and chrome-extension are already handled in AppServiceProvider::boot().

Test plan

  • Install a Firefox extension that makes API calls through an Expose tunnel
  • Verify requests with Origin: moz-extension://... no longer crash the logger
  • Verify existing capacitor:// and chrome-extension:// handling still works

Firefox browser extensions send requests with `Origin: moz-extension://...` headers.
The Laminas UriFactory throws an InvalidArgumentException when parsing this
unregistered scheme, which crashes the request logger and prevents proxying.

This follows the existing pattern for `capacitor` and `chrome-extension` schemes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant