# Adding Support for Cross-Origin Embedder Policy and Cross-Origin Resource Policy Headers

**URL:** <https://forum.djangoproject.com/t/adding-support-for-cross-origin-embedder-policy-and-cross-origin-resource-policy-headers/45664>\
**Category:** Django Internals\
**Created:** [August 4, 2026, 10:36am UTC](https://forum.djangoproject.com/t/adding-support-for-cross-origin-embedder-policy-and-cross-origin-resource-policy-headers/45664 "2026-08-04T10:36:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blighj](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/blighj/32/29054_2.png) [@blighj](https://forum.djangoproject.com/u/blighj)\
**Post date:** [August 4, 2026, 10:36am UTC](https://forum.djangoproject.com/t/adding-support-for-cross-origin-embedder-policy-and-cross-origin-resource-policy-headers/45664/1 "2026-08-04T10:36:28Z")

</div>

I’ve been reviewing first time contributor @ashishmurugan’s PR [21705](https://github.com/django/django/pull/21705) for [ticket-31923](https://code.djangoproject.com/ticket/31923)

It’s in good shape, they’ve done great work. It adds support for two new security headers  
[COEP](https://html.spec.whatwg.org/multipage/origin.html#coep) and [CORP](https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header)

In my review I steered both to default to off and I think wider input on this would be welcome from the likes of @adamchainz and @robhudson and anyone else with good experience in this area.

I think COEP defaulting to off is not controversial, CORP might seem safe to default to something more restrictive, but I hesitate due to the common whitenoise setup with a CDN.

Whitenoise docs suggest putting its entry below SecurityMiddleware, so it would add the CORP default to those static assets and if they are then served by a CDN does that mean it would take those headers and your site would not load the assets?

I worry it does, so that’s why I asked for a None default and some wider input. The PR also adds a decorator override for each header. Useful for COEP to set just one view restrictive and useful for CORP to set one view less restrictive if you have set a restrictive value with the setting. You could argue less useful if our default is not restrictive.

---

<div class="post-metadata">

**Author:** ![ashishmurugan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/ashishmurugan/32/33036_2.png) [@ashishmurugan](https://forum.djangoproject.com/u/ashishmurugan)\
**Post date:** [September 11, 2026, 2:28pm UTC](https://forum.djangoproject.com/t/adding-support-for-cross-origin-embedder-policy-and-cross-origin-resource-policy-headers/45664/2 "2026-09-11T14:28:23Z")

</div>

Friendly follow-up on this proposal. PR #21705 [Fixed #31923 -- Added Cross-Origin-Embedder-Policy and Cross-Origin-Resource-Policy header support. by ashishmurugan · Pull Request #21705 · django/django · GitHub](https://github.com/django/django/pull/21705) remains green and has received an initial approval. The main open question appears to be the defaults for COEP/CORP and whether both decorators are desirable. Would anyone with experience in this area be able to share their thoughts when convenient?
