Forum Discussion
bigben932_22424
Altostratus
Dec 12, 2018HTTP::header replace "Content-Type" not working
I have created an iRule to replace the Content-type header of a file. I am trying to replace a file with the mime type text/plain with text/css. However it seems that some header fields like Content-type cannot be changed by the iRule.
when HTTP_RESPONSE {
Not working
HTTP::header replace "Content-Type" "text/css"
Working
HTTP::header replace "Content-Type2" "text/css"
}
The response header shown by the browser looks like this:
Accept-Ranges: none
Connection: close
Content-Security-Policy: default-src 'self' 'unsafe-inline' 'unsafe-eval' ws: wss: jar: data: blob: mediasource: mediastream:;
Content-Type: text/plain
Content-Type2: text/css
Date: Wed, 12 Dec 2018 18:37:00 GMT
ETag: "1d555-2d01-57cd0bd9120c0"
Last-Modified: Wed, 12 Dec 2018 10:34:19 GMT
Server: Apache
Transfer-Encoding: chunked
No RepliesBe the first to reply
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects