Skip to content

Commit

Permalink
lowercase http header before equality check
Browse files Browse the repository at this point in the history
  • Loading branch information
Grekkq committed Nov 23, 2023
1 parent 32396bc commit cf5e139
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ object ProxyDirectives extends LazyLogging {

def cors(): Directive0 = {
extractRequest.flatMap { request =>
if (request.headers.exists(_.name().equals(ORIGIN))) {
if (request.headers.exists(_.name().toLowerCase.equals(ORIGIN.toLowerCase))) {
mapResponseHeaders { oldHeaders =>
Seq(
`Access-Control-Allow-Origin`.*,
Expand Down

0 comments on commit cf5e139

Please sign in to comment.