Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow routes to override some HTTP config values #48470

Closed
joshdover opened this issue Oct 16, 2019 · 2 comments · Fixed by #50783
Closed

Allow routes to override some HTTP config values #48470

joshdover opened this issue Oct 16, 2019 · 2 comments · Fixed by #50783
Assignees
Labels
blocker Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.6.0 v8.0.0

Comments

@joshdover
Copy link
Contributor

In the legacy platform, some plugins override the default HTTP config on the hapi server on specific routes. For instance, this may be used to allow larger-than-normal request bodies for a particular route.

@joshdover joshdover added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform labels Oct 16, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@afharo afharo self-assigned this Nov 12, 2019
@afharo
Copy link
Member

afharo commented Nov 14, 2019

After some investigations, I've only seen the following overrides across the entire project:

  • payload.output: 'stream' + payload.parse: false used in the console
  • payload.output: 'stream' + payload.allow: 'multipart/form-data' in the import endpoints
  • payload.allow: 'application/json' + payload.maxBytes: N in the batch functions endpoint (/fns)

The allow options are only enforcing that the endpoint only accepts that. When that property is omitted, those Content-Types are still allowed but others as well. So I guess it makes sense to expose it as well.

Other options in the payload are: https://hapi.dev/api/?v=18.4.0#-routeoptionspayload

So far I'm only going to expose the already used ones. We can come back to this later if we feel like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.6.0 v8.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants