Skip to content

Commit e84b0ab

Browse files
[HTTP] Fix api/oas dev route (#223487)
## Summary This fixes the `api/oas` route that was broken due to missing `security.authz` param. In #220231 the `security.authz` param is asserted as non-null but when the route is assigned directly from the `internalSetup.server`, this is not the case. I believe this is the only such case where this applies. ### Checklist - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. --------- Co-authored-by: Elena Shostak <[email protected]>
1 parent 2941d04 commit e84b0ab

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/core/packages/http/server-internal/src/http_service.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export class HttpService
273273
version: schema.maybe(schema.string()),
274274
excludePathsMatching: schema.maybe(stringOrStringArraySchema),
275275
pathStartsWith: schema.maybe(stringOrStringArraySchema),
276-
pluginId: schema.maybe(schema.string()),
276+
pluginId: schema.maybe(schema.string()), // i.e. `@kbn/lens-plugin`
277277
});
278278

279279
server.route({
@@ -324,7 +324,15 @@ export class HttpService
324324
);
325325
},
326326
options: {
327-
app: { access: 'public' },
327+
app: {
328+
access: 'public',
329+
security: {
330+
authz: {
331+
enabled: false,
332+
reason: 'Dev only route',
333+
},
334+
},
335+
},
328336
auth: false,
329337
cache: {
330338
privacy: 'public',

0 commit comments

Comments
 (0)