Joined June 2014
·
B2495caca536aa0a730da3f0aeace952

Sébastien Lorber

Paris
·
·

Posted to Scala map to tuples or splat operator over 1 year ago

Hahaha really funny I encountered the same problem with Play response ;)

map { result =>
val originToAllow = request.headers.get("Origin").getOrElse("")
val newHeaders: Map[String, String] = result.header.headers + ("Access-Control-Allow-Origin" -> originToAllow)
result.withHeaders(newHeaders.toSeq: _
)
}

Achievements
29 Karma
0 Total ProTip Views
Interests & Skills