Oleg Isonen 410fedbe83 fix: Allow self-hosted Node forms to reach sibling APIs (#6627)
Docker and Coolify exports still reject a Form Resource on a sibling API
host. The Node generator denies the entire registrable domain, so
`webstudio-demo-john.stauferth.de` cannot submit to `cms.stauferth.de`.

This follow-up will allow public sibling API hosts while keeping DNS
address validation and stopping Resource requests that return to the
same project through an alias.

Ref #6623

## Plan
- [x] Reproduce the Node export rejection and add a failing regression
test.
- [x] Restrict the Node hostname deny rule to the site's known hosts.
- [x] Mark outbound Node Resource requests and reject same-project
reentry before page data loads.
- [x] Verify public DNS pinning, redirects, other-project requests, and
existing Cloudflare behavior.
- [x] Review the Builder product docs for Node self-hosting and update
them if needed.
- [x] Run targeted tests, typechecks, lint, fixture generation, and
required CI. All checks on `fb283ea4b6` passed, including the main
workflow, visual regression, lint, submodules, and staging deploy.

Expected production change: roughly 30–50 net lines across the
generator, Node transport, and route templates. No new package, service,
or user-facing error text. A CLI release and republish will be required
to update existing exports.

## Verification
- Reproduced the Node rejection for `cms.stauferth.de` from
`webstudio-demo-john.stauferth.de`; the new generator test failed before
the fix and passed after it.
- SDK marker test failed without the marker assignment, then passed.
Focused SDK tests: 27 passed. CLI prebuild: 144 passed.
- SDK and CLI typechecks, SDK published types, root lint and package
boundaries, fixture generation, Docker fixture typecheck and production
build passed.
- The built Docker fixture returned 508 for marked same-project GET and
Form POST requests and 200 for another project's GET.
- The Node connector still vets and pins public DNS answers on each hop.
A reverse proxy must preserve the marker header for unknown-alias
reentry detection. No live customer deployment was tested.
- Actual source change: 59 net non-test lines, plus 268 generated
fixture lines. Both legacy and React Router route templates need entry
checks because Node exports lack a Worker entrypoint.
2026-11-01 12:54:07 +01:00
2026-07-12 11:27:58 +02:00
2026-02-05 10:25:17 +01:00
2026-03-20 21:09:47 +01:00
2023-09-06 21:43:29 +03:00

builder-screenshot

Webstudio is an Open Source Visual Development Platform for developers, designers, and cross-functional teams. You own the data, components, and infrastructure. You can use the hosted version or roll out your own.


Learning Resources

Social Media

License

  • Webstudio core (all functionality in this repository) is free/open-source under AGPL-3.0-or-later.
  • sdk-components-animation package (optional) is proprietary. You must accept the Webstudio, Inc. EULA located in sdk-components-animation/LICENSE before using it.
Languages
TypeScript 97.9%
PLpgSQL 1.5%
CSS 0.3%
Shell 0.2%
JavaScript 0.1%