我正在尝试将标头设置为HttpResponse
var response = HttpResponse()
val acrh = request.headers.filter(q => q.name() == "Access-Control-Request-Headers").head.value()
response = response.addHeader(`Access-Control-Allow-Headers`(acrh))
response = response.addHeader(`Access-Control-Request-Headers`(acrh))
作为回应,我只能看到“Access-Control-Allow-Headers”,我收到此错误
"HTTP header 'Access-Control-Request-Headers' is not allowed in responses".
我该如何解决这个问题?我需要为CORS实现这个。