Filter spans based on response header and add a custom label

Hi guys!

I recently installed apm-server, elasticsearch and Kibana on a Centos 7 test server.

Ths support for APM RUM-JS on apm-server was enabled.

I'm trying to find a way to filter extensions based on response headers and then add a custom label based on the value of that header.
The response header I want to filter out is "X-Cache-Status" and then based on its "hit, miss, bypass ... '' value, add a custom label to the spam like "cache-status: hit".

Is it possible to implement this configuration in RUM-JS?

The purpose is to filter the spans and aggregate data, based on this custom label on kibana dashboards.

I've read some documentation for the RUM-JS agent, but I don't see any example response headers from some requests being used to enrich data sent by RUM-JS.
Envoirment:
Kibana version: 7.13

Elasticsearch version: 7.13

APM Server version: 7.13

APM Agent language and version: RUM-JS 5.8

Original install method (e.g. download page, yum, deb, from source, etc.) and version: yum in a centos 7

Fresh install

Thank you so much for everyone's help!