diff --git a/devenv/local_cdn/default.conf b/devenv/local_cdn/default.conf index e35c16ee146..0c37c5ff410 100644 --- a/devenv/local_cdn/default.conf +++ b/devenv/local_cdn/default.conf @@ -19,6 +19,6 @@ server { add_header 'Access-Control-Allow-Headers' '*' always; add_header 'Access-Control-Allow-Credentials' 'true' always; - rewrite ^/grafana-oss/11.4.0-pre/public(.*)$ $1 last; + rewrite ^/grafana-oss/12.1.0-pre/public(.*)$ $1 last; } } diff --git a/public/app/features/plugins/loader/cache.ts b/public/app/features/plugins/loader/cache.ts index 00e77489efd..877d7fc485b 100644 --- a/public/app/features/plugins/loader/cache.ts +++ b/public/app/features/plugins/loader/cache.ts @@ -54,7 +54,20 @@ export function getPluginFromCache(path: string): CachedPlugin | undefined { export function extractCacheKeyFromPath(path: string) { const regex = /\/?public\/plugins\/([^\/]+)\//; const match = path.match(regex); - return match ? match[1] : null; + + if (match) { + return match[1]; + } + + // Decoupled core plugins can be loaded by alternative paths + const decoupledPluginRegex = /\/?public\/app\/plugins\/(?:datasource|panel)\/([^\/]+)\//; + const decoupledPluginMatch = path.match(decoupledPluginRegex); + + if (decoupledPluginMatch) { + return decoupledPluginMatch[1]; + } + + return null; } function getCacheKey(address: string): string | undefined {