Skip to content

Commit bdd6218

Browse files
authored
disable router prefixing with pluginId (#44855) (#44908)
to unblock plugin migration until new api and static resource services are available
1 parent c777b5b commit bdd6218

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core/server/plugins/plugin_context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export function createPluginSetupContext<TPlugin, TPluginDependencies>(
113113
null,
114114
plugin.opaqueId
115115
),
116-
createRouter: () => deps.http.createRouter(`/${plugin.name}`, plugin.opaqueId),
116+
createRouter: () => deps.http.createRouter('', plugin.opaqueId),
117117
registerOnPreAuth: deps.http.registerOnPreAuth,
118118
registerAuth: deps.http.registerAuth,
119119
registerOnPostAuth: deps.http.registerOnPostAuth,

test/plugin_functional/plugins/core_plugin_b/server/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ declare module 'kibana/server' {
2929
export class CorePluginBPlugin implements Plugin {
3030
public setup(core: CoreSetup, deps: {}) {
3131
const router = core.http.createRouter();
32-
router.get({ path: '/', validate: false }, async (context, req, res) => {
32+
router.get({ path: '/core_plugin_b/', validate: false }, async (context, req, res) => {
3333
if (!context.pluginA) return res.internalError({ body: 'pluginA is disabled' });
3434
const response = await context.pluginA.ping();
3535
return res.ok({ body: `Pong via plugin A: ${response}` });

0 commit comments

Comments
 (0)