CloudFlare Worker for CSP Header
Budget: $10 – $30 USD
We built a worker that modifies the CSP header and when we navigate to the worker subdomain (https://tiny-truth.domain.workers.dev/) it works just fine. But we can't figure out how to attach it to the root domain.
I am sure this is a simple setting that we are overlooking. Who has a few minutes to show us what we are missing?
The site is using partial DNS, not full DNS.
export default {
async fetch(request) {
const response = await fetch("https://domain.com");
const newResponse = new Response(response.body, response);
// Adjust the value for an existing header
newResponse.headers.set("x-powered-by","Obi-Wan Kenobi");
return newResponse;
},
};
I am sure this is a simple setting that we are overlooking. Who has a few minutes to show us what we are missing?
The site is using partial DNS, not full DNS.
export default {
async fetch(request) {
const response = await fetch("https://domain.com");
const newResponse = new Response(response.body, response);
// Adjust the value for an existing header
newResponse.headers.set("x-powered-by","Obi-Wan Kenobi");
return newResponse;
},
};