Skip to content

Commit

Permalink
disable router prefixing with pluginId (#44855)
Browse files Browse the repository at this point in the history
to unblock plugin migration until new api and static
resource services are available
  • Loading branch information
mshustov authored Sep 5, 2019
1 parent a712751 commit 861a1e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/server/plugins/plugin_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function createPluginSetupContext<TPlugin, TPluginDependencies>(
null,
plugin.opaqueId
),
createRouter: () => deps.http.createRouter(`/${plugin.name}`, plugin.opaqueId),
createRouter: () => deps.http.createRouter('', plugin.opaqueId),
registerOnPreAuth: deps.http.registerOnPreAuth,
registerAuth: deps.http.registerAuth,
registerOnPostAuth: deps.http.registerOnPostAuth,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ declare module 'kibana/server' {
export class CorePluginBPlugin implements Plugin {
public setup(core: CoreSetup, deps: {}) {
const router = core.http.createRouter();
router.get({ path: '/', validate: false }, async (context, req, res) => {
router.get({ path: '/core_plugin_b/', validate: false }, async (context, req, res) => {
if (!context.pluginA) return res.internalError({ body: 'pluginA is disabled' });
const response = await context.pluginA.ping();
return res.ok({ body: `Pong via plugin A: ${response}` });
Expand Down

0 comments on commit 861a1e2

Please sign in to comment.