digital-form-builder icon indicating copy to clipboard operation
digital-form-builder copied to clipboard

Support routing based on domain

Open superafroman opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. Currently you can deploy multiple forms within one runner but they must all reside on the same domain.

Describe the solution you'd like Add a configuration option to the form schema that allows you to specify a domain. If specified the form will be served on that domain only. If mulitple forms specify the same domain it should work as it does now by serving each form under it's own path (based on file name).

Describe alternatives you've considered Deploy multiple runners, this is what we do at the moment, but it's inefficient particularly for the long tail of forms.

superafroman avatar Apr 13 '21 10:04 superafroman

👋 could you let me know how you're thinking of tackling this? (and when!) - sorry, I don't want to bog you down with bureaucracy. This might affect how we tackle persistence (although we might not look at this for the foreseeable 🥲)

A few things come to mind

  • Maybe we have an orchestrator plugin, which loads up/sets up multiple runners for the different domains
    • or a plugin that registers/loads a form, with one of the options being the domain to register it to
  • https://hapi.dev/api/?v=20.1.2#-serverrealm might be relevant

jenbutongit avatar Apr 14 '21 17:04 jenbutongit