Forum Discussion
Hamid20n
Altocumulus
Dec 07, 2021change content type for specific uri in http response
How can I change content type for specific uri in http response ?? for example : $ curl -I https://xxxxxx.com/.well-known/apple-app-site-association
HTTP/1.1 200 OK
Date: Mon, 06 Dec 2021 05:57:...
- 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 } }
spalande
Nacreous
Dec 08, 2021Not 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
}
}Hamid20n
Altocumulus
Dec 08, 2021I'm really thankful for your useful reply. It completely solved my issue.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
