Is it possible to set different Cache-Control header for 200 and 404 request

Hello @Toby Lam

I believe you have a similar support ticket opened.

I will provide the latest response we have for this question, in hopes that it may help others with a similar question/issue.

You can edit/add a property to HTTPStreamer/Properties to control the Cache-Control header that is returned for HTTP streaming when a response in the 400s is returned

To change this for all http protocols you can use httpCacheControlStatus4xx then set value to no-cache
It would look something like this:

<Property>
    <Name>httpCacheControlStatus4xx</Name>
    <Value>no-cache</Value>
    <Type>String</Type>
</Property>

You could also use values that are documented here:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

If you wanted to only send a response like that for HLS stream requests, you would use cupertinoCacheControlStatus4xx for the name.

Each application would need to be changed to contain the above to send the response you want for the 400s responses.

The 200s responses are handled by the playlist and chunk responses that I mentioned before.
So it would look something like this for playlist:

    <Property>
        <Name>cupertinoCacheControlPlaylist</Name>
        <Value>max-age=[number of seconds]</Value>
        <Type>String</Type>
    </Property>

Similarly for each chunk:

    <Property>
        <Name>cupertinoCacheControlMediaChunk</Name>
        <Value>max-age=[number of seconds]</Value>
        <Type>String</Type>
    </Property>