Generates custom HTTP response headers to return to the client.
<cfheader>
cfheader();
utf-8iso-8859-1windows-1252us-asciishift_jisiso-2022-jpeuc-jpeuc-krbig5euc-cnutf-16Use cfheader to return a Content-Security-Policy HTTP response header.
<cfheader name="Content-Security-Policy" value="default-src 'self'">
Uses cfheader to return a 405 Method Not Allowed status when method is not POST.
<cfif uCase(cgi.request_method) IS NOT "POST">
<cfheader statuscode="405" statustext="Method Not Allowed">
Sorry POST only.<cfabort>
</cfif>
CFScript syntax to return a JSON content type header.
cfheader( name="Content-Type", value="application/json" )
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.