next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

Send host header to Decoupled Router.

Open longwave opened this issue 8 months ago • 2 comments

This pull request is for: (mark with an "x")

  • [ ] examples/*
  • [ ] modules/next
  • [x] packages/next-drupal
  • [ ] starters/basic-starter
  • [ ] starters/graphql-starter
  • [ ] starters/pages-starter
  • [ ] Other

GitHub Issue: #332 Please add a link to the GitHub issue where this problem is discussed.

  • [x] I need help adding tests. (mark with an "x") Code changes need test coverage. If you don't know how to make tests, check this box to ask for help.

Describe your changes

This is an alternative to the suggestion in #332, instead of needing different Drupal base URLs we pass on the host header from the original request as a query parameter to Decoupled Router. I also have an extended version of Decoupled Router that interprets that query parameter and passes it to Domain module, allowing decoupled multi-domain setups with a single Drupal backend URL.

longwave avatar Jun 05 '25 11:06 longwave

@longwave is attempting to deploy a commit to the Chapter Three Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jun 05 '25 11:06 vercel[bot]

Well, except this doesn't really work because it makes all requests dynamic as soon as you look at headers; it works in development mode but not in a production build.

longwave avatar Jun 05 '25 21:06 longwave