Skip to content

Support Fred as a dynamic content source #526

Description

@caugner

What information was incorrect, unhelpful, or incomplete?

The cloud function cannot currently use Fred's development server as SOURCE_CONTENT.

Content requests are rewritten to the static build layout (.../index.html). The content proxy also buffers responses and replaces upstream 404 responses. Fred expects the original request URL, renders its own 404 pages, and uses long-lived responses for development features such as HMR.

This prevents running the production routing middleware in front of Fred during local development.

What did you expect to see?

Add an opt-in content-source mode for HTTP application servers, for example:

SOURCE_CONTENT_MODE=server
SOURCE_CONTENT=http://localhost:3000/

In this mode, the cloud function should:

  • Preserve request URLs instead of applying resolveIndexHTML.
  • Stream page and asset responses from SOURCE_CONTENT.
  • Preserve upstream status codes and response bodies, including 404 responses.
  • Support long-lived responses without buffering them.
  • Continue applying the existing redirect, locale, and origin middleware.

The current static-content behavior should remain the default and remain unchanged for deployed environments.

Do you have any supporting links, references, or citations?

Do you have anything more you want to share?

Generating or remotely loading canonicals.json and redirects.json, publishing the cloud server, and orchestrating the Fred and Rari processes are outside the scope of this issue.

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

    needs triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions