Issue with headers: "expect-ct" and "report-to" causing 404?


I am using a Worker to create a reverse proxy for a subdirectory. This works fine overall, but in one case, a 404 is thrown, even though the page actually exists on the end server.

The only difference I can see when testing is that these headers are inserted into that request:

expect-ct:max-age=604800, report-uri=“

This is an example of a request that works:

This is an example of one that throws a 404:

I don’t understand why the headers are present in one case and not in the other, but if it’s not possible to fix the issue in another way, I’d like to just have the “expect-ct” and “report-to” removed. I emailed support about that, but since I’m on a free plan, I don’t have email support included, so they referred me here.

Does anybody know how this can get solved?


Those headers are added to all responses that pass through the Cloudflare network, and I can see them on both of the example URLs you indicated. They are for reporting purposes, and will not be the cause of your problem. I would be confident that they have absolutely nothing to do with the problem you are experiencing.

Do you see the requests hitting the origin server for either or both requests? Are you trying to route requests for a particular subdirectory to an Origin different to the one configured in the DNS records?

% curl --dump-header - "" -o /dev/null --silent | grep -E 'expect-ct|report-to|server'
expect-ct: max-age=604800, report-uri=""
report-to: {"endpoints":[{"url":"https:\/\/\/report\/v3?s=ahOxAXyG7tEmWPpydunL6X%2BpFLBcLDTUj56AwyuJA2n2bTs3GP5QBuorESMof3kxi4CVnP9dli80zeKsEy%2BNU0SRwwARJvrMiW%2F3wadZauZ3xRxM4KVOXcYWL91iArhq8A%3D%3D"}],"group":"cf-nel","max_age":604800}
server: cloudflare
% curl --dump-header - "" -o /dev/null --silent | grep -E 'expect-ct|report-to|server'
expect-ct: max-age=604800, report-uri=""
report-to: {"endpoints":[{"url":"https:\/\/\/report\/v3?s=tEnT9DJHK9y0UlxYsElE1kX7PO%2FPrnPQ2jlPHWxcgq%2BhDMXlkVvxu%2Bmb%2FlpMQKgznt4IB31KvN4nezNp%2F7LGajM%2BUFmTPGji7Uoa%2F%2BtxeJqvLuxmY3sHf7V66SdksVdUxw%3D%3D"}],"group":"cf-nel","max_age":604800}
server: cloudflare
1 Like