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

Hello,

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=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct
nel:{“success_fraction”:0,“report_to”:“cf-nel”,“max_age”:604800}
report-to:{“endpoints”:[{“url”:“https://a.nel.cloudflare.com/report/v3?s=xxxxx”}],“group”:“cf-nel”,“max_age”:604800}
server:Cloudflare

This is an example of a request that works:
https://futbolbase.org/comunidad/Question/Answer?questionId=3894279

This is an example of one that throws a 404:
https://futbolbase.org/comunidad/ReportContent/Submit/3879473

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?

Thanks,
David

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 - "https://futbolbase.org/comunidad/Question/Answer?questionId=3894279" -o /dev/null --silent | grep -E 'expect-ct|report-to|server'
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=ahOxAXyG7tEmWPpydunL6X%2BpFLBcLDTUj56AwyuJA2n2bTs3GP5QBuorESMof3kxi4CVnP9dli80zeKsEy%2BNU0SRwwARJvrMiW%2F3wadZauZ3xRxM4KVOXcYWL91iArhq8A%3D%3D"}],"group":"cf-nel","max_age":604800}
server: cloudflare
% curl --dump-header - "https://futbolbase.org/comunidad/ReportContent/Submit/3879473" -o /dev/null --silent | grep -E 'expect-ct|report-to|server'
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=tEnT9DJHK9y0UlxYsElE1kX7PO%2FPrnPQ2jlPHWxcgq%2BhDMXlkVvxu%2Bmb%2FlpMQKgznt4IB31KvN4nezNp%2F7LGajM%2BUFmTPGji7Uoa%2F%2BtxeJqvLuxmY3sHf7V66SdksVdUxw%3D%3D"}],"group":"cf-nel","max_age":604800}
server: cloudflare
1 Like