Skip to content

docs: drop TrustProxies.php from reverse-proxy guidance - #114

Open
nicdavidson wants to merge 2 commits into
developfrom
reverse-proxy-section-references-trustproxies.ph
Open

docs: drop TrustProxies.php from reverse-proxy guidance#114
nicdavidson wants to merge 2 commits into
developfrom
reverse-proxy-section-references-trustproxies.ph

Conversation

@nicdavidson

Copy link
Copy Markdown
Collaborator

Fixes #112.

The reverse-proxy section on the MCP deployment page told operators to edit app/Http/Middleware/TrustProxies.php. DreamFactory does not ship that file (app/Http/Middleware/ only has PreventRequestForgery.php), so a customer following the page goes looking for something that is not there.

The same section also overstated APP_URL. Discovery URLs read it directly, so setting it to the external HTTPS URL is enough for MCP OAuth. Laravel-generated redirects (including / → the admin UI) are built from the incoming request, so behind a TLS-terminating proxy they still come back as http://.

Changes

  • Remove the TrustProxies.php block from Deploying the MCP Server.
  • Scope APP_URL to OAuth discovery, and document FORCE_HTTPS=true as the supported application-level switch (URL::forceScheme('https') in AppServiceProvider).
  • Keep the existing nginx X-Forwarded-Protofastcgi_param HTTPS recipe.
  • Expand the TLS section on Web Server so general reverse-proxy guidance lives there.
  • Add FORCE_HTTPS to the .env parameter list on Basic Configuration.

Verified npm run build with no broken-link warnings.

The product does not ship that middleware. Document FORCE_HTTPS and
nginx scheme passthrough instead, and scope APP_URL to OAuth discovery.

Fixes #112
FORCE_HTTPS is read with env() in AppServiceProvider, so a cached
config dump makes the setting a no-op and redirects go back to http.
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