appendIfAbsent

fun ResponseHeaders.appendIfAbsent(name: String, value: String, safeOnly: Boolean = true)

Appends a response header with the specified name and value if this is no header with name yet.

Parameters

safeOnly

prevents from setting unsafe headers; true by default