# All plugins not functioning due to CORS error after recent upgrade

**URL:** https://meta.discourse.org/t/all-plugins-not-functioning-due-to-cors-error-after-recent-upgrade/399466
**Category:** Self-hosting
**Tags:** cdn
**Created:** [March 27, 2026, 8:35pm UTC](https://meta.discourse.org/t/all-plugins-not-functioning-due-to-cors-error-after-recent-upgrade/399466 "2026-03-27T20:35:59Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![tanya\_byrne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tanya_byrne/32/444826_2.png) [@tanya\_byrne](https://meta.discourse.org/u/tanya_byrne)
#### Post date: [April 1, 2026, 12:08am UTC](https://meta.discourse.org/t/all-plugins-not-functioning-due-to-cors-error-after-recent-upgrade/399466/9 "2026-04-01T00:08:14Z")

</div>

> [@david](#):
>
> In the new plugin system, we use `script type="module"`, which requires the correct CORS headers to be set. Old-style `script type="text/javascript"` do not require those headers.

Yep, confirmed this issue on Azure Classic CDN too.

You need to add a new rule to the rules engine, example below:

```plaintext
"rules": [

                        {

                            "name": "JSCORS",

                            "order": 1,

                            "conditions": [

                                {

                                    "name": "RequestUri",

                                    "parameters": {

                                        "typeName": "DeliveryRuleRequestUriConditionParameters",

                                        "operator": "Contains",

                                        "negateCondition": false,

                                        "matchValues": [

                                            "/assets/js/plugins/"

                                        ],

                                        "transforms": []

                                    }

                                }

                            ],

                            "actions": [

                                {

                                    "name": "ModifyResponseHeader",

                                    "parameters": {

                                        "typeName": "DeliveryRuleHeaderActionParameters",

                                        "headerAction": "Overwrite",

                                        "headerName": "Access-Control-Allow-Origin",

                                        "value": "https://forums.mycoolforum.com"

                                    }

                                },

                                {

                                    "name": "ModifyResponseHeader",

                                    "parameters": {

                                        "typeName": "DeliveryRuleHeaderActionParameters",

                                        "headerAction": "Overwrite",

                                        "headerName": "Content-Type",

                                        "value": "application/javascript"

                                    }

                                },

                                {

                                    "name": "CacheExpiration",

                                    "parameters": {

                                        "typeName": "DeliveryRuleCacheExpirationActionParameters",

                                        "cacheBehavior": "BypassCache",

                                        "cacheType": "All"

                                    }

                                }

                            ]

```

---

_[View the full topic](https://meta.discourse.org/t/all-plugins-not-functioning-due-to-cors-error-after-recent-upgrade/399466)._
