You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 15, 2022. It is now read-only.
Taking Apache as an example, the code output may look like this:
# for all responses
<IfModule mod_headers.c>
Header set "Cache-Control" 'no-cache'
</IfModule>
# for single response
Header set "Cache-Control" 'no-cache'
Actually both these cases set the header for all responses.
If you want a header only to be included in a response for certain files based on file extension you could use e.g. <FilesMatch>, or preferably based on MIME type using expr.
<IfModule mod_headers.c>
# Based on file extension:
<FilesMatch "\.(htm|html)$">
Header set Cache-Control "no-cache"
</FilesMatch>
# Based on MIME-Type:
Header set Cache-Control "no-cache" "expr=%{CONTENT_TYPE} =~ m#text/html#i
</IfModule>
Perhaps there could be an option to choose which MIME-types or file extensions the build should apply to?