Stay organized with collections
Save and categorize content based on your preferences.
Service Extensions lets you use extensions to insert custom
code in the Media CDN processing path.
This page provides an overview about Media CDN extensions.
Media CDN provides many built-in core capabilities to address
the most common use cases for content delivery networks (CDNs). You might have
requirements beyond these capabilities. For example, you might need to
normalize headers to improve caching, use a custom URL signing algorithm, or
port legacy behavior from an existing CDN to Media CDN.
Service Extensions helps you add
custom code for lightweight compute use cases in
the request and response processing paths by using plugins.
Plugins can access and manipulate HTTP request and response
headers and then serve synthetic responses. Plugins can also perform
additional actions such as HTTP redirects and URL rewrites.
As Figure 1 shows, with Service Extensions, you can use plugins
to place custom code that implements specific actions at the edge,
in front of the cache in the Media CDN processing path.
Figure 1. Media CDN uses plugins
to add custom code to the processing path (click to enlarge).
How Media CDN plugins work
On the Media CDN request path, plugins run after route
matching and Google Cloud Armor edge security policies but before cache key
calculation and the addition of custom headers to the origin.
On the response path, plugins run after content is served from cache, allowing
for cached content to be manipulated.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# Media CDN extensions overview\n\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nService Extensions lets you use extensions to insert custom\ncode in the [Media CDN](/media-cdn/docs/overview) processing path.\nThis page provides an overview about Media CDN extensions.\n\nMedia CDN provides many built-in core capabilities to address\nthe most common use cases for content delivery networks (CDNs). You might have\nrequirements beyond these capabilities. For example, you might need to\nnormalize headers to improve caching, use a custom URL signing algorithm, or\nport legacy behavior from an existing CDN to Media CDN.\n\nService Extensions helps you add\ncustom code for [lightweight](/service-extensions/docs/quotas) compute use cases in\nthe request and response processing paths by using [plugins](/service-extensions/docs/plugins-overview).\nPlugins can access and manipulate HTTP request and response\nheaders and then serve synthetic responses. Plugins can also perform\nadditional actions such as HTTP redirects and URL rewrites.\n\nAs Figure 1 shows, with Service Extensions, you can use plugins\nto place custom code that implements specific actions at the edge,\nin front of the cache in the Media CDN processing path.\n[](/static/service-extensions/images/plugins-processing-path.svg) **Figure 1.** Media CDN uses plugins to add custom code to the processing path (click to enlarge). **Important:** To request access to Media CDN, contact your Google Cloud sales representative or your account team.\n\nHow Media CDN plugins work\n--------------------------\n\nOn the Media CDN request path, plugins run after route\nmatching and Google Cloud Armor edge security policies but before cache key\ncalculation and the addition of custom headers to the origin.\n\nOn the response path, plugins run after content is served from cache, allowing\nfor cached content to be manipulated.\n| **Note:** Media CDN doesn't support callouts or HTTP body callbacks.\n\nWhat's next\n-----------\n\n- [Create a plugin](/service-extensions/docs/create-plugin)\n- [Attach a plugin to a Media CDN route](/service-extensions/docs/attach-plugins-to-routes)\n- See the [Service Extensions overview](/service-extensions/docs/overview)."]]