Forum Discussion
change content type for specific uri in http response
- Dec 08, 2021
Not sure how exactly this would help if response is not coming in json format from the server. but you can try below.
when HTTP_REQUEST { set var_uri [HTTP::uri] } when HTTP_RESPONSE { if { $var_uri eq "/.well-known/apple-app-site-association" } { log local0. "match found $var_uri" HTTP::header replace "Content-Type" "application/json" return } }
Not sure how exactly this would help if response is not coming in json format from the server. but you can try below.
when HTTP_REQUEST {
set var_uri [HTTP::uri]
}
when HTTP_RESPONSE {
if { $var_uri eq "/.well-known/apple-app-site-association" } {
log local0. "match found $var_uri"
HTTP::header replace "Content-Type" "application/json"
return
}
}
- Hamid20nDec 08, 2021Altocumulus
I'm really thankful for your useful reply. It completely solved my issue.
- Deepak_Kumar2Mar 21, 2022Nimbostratus
Hi spalande
Can you pls also help on this. I am also getting issue whie creating monitor with content-type.
I have raised: https://community.f5.com/t5/technical-forum/https-monitor-with-headers-content-type/m-p/293557
Can you pls support me here.
Recent Discussions
Related Content
* 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