How do I edit the response headers?

I want to use https://partytown.builder.io/atomics, which requires these headers:

Cross-Origin-Embedder-Policy: credentialless
Cross-Origin-Opener-Policy: same-origin

How do I edit the CMS site to use these headers?

Hi, @icheshire :waving_hand: Thanks for reaching out!

The available security header options available to CMS Hub subscribers are listed here — Additional domain security settings (CMS Hub only).

In your case, neither Embedder-Policy nor Opener-Policy are on this list.

I know this isn’t the answer you are wanting, and I hope it helps you get moving forward.

Best,

Jaycee

Ok. Is there a way to request it?

If you upload the necessary partytown JS lib files via Design Manager (or the hs cli) then you will be able to serve those “raw asset” files directly from your HubSpot domain (which should prevent the need to have those headers because the partytown JS will be on the same domain as your website).

For example…

And after those are in place I can access them from https://<HubSpot CMS domain>/hubfs/<hubid>/raw_assets/public/@generated/partytown/v0_8_0/partytown-atomics.min.js

Ah, nevermind. I was thinking about regular CORs and `Access-Control-Allow-Origin` but `Cross-Origin-Embedder-Policy` is different (and yes we currently have no way to add that header).

Almost.

You forgot to setup a Proxy URL to these files… Easy regex config possible.

Exercise left to readers.

But, yes HubSpot is missing a *ton* of options that *significantly* impeded modern web development to the point it’s almost moot.
Partytown, 103 hints, etc, etc critical to performance

Hey, @icheshire :blush: It depends. Can you request it be unlocked or added to a specific portal? That is not an option as an add-on or additional service.

If you are asking in a big picture way, can it be requested? Then yes, you can. By adding your suggestion to the Ideas Community. If you add a link back to your Idea post, I’ll give it an upvote to help get the ball rolling.

Best,

Jaycee

Made a request: https://community.hubspot.com/t5/HubSpot-Ideas/Allow-
response-headers-to-be-customized/idi-p/812072#M147265