Skip to content

Commit

Permalink
return false when @origin is nil
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
  • Loading branch information
ganmacs committed Feb 12, 2020
1 parent 33396e4 commit ed85d4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/fluent/plugin/in_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ def send_response_nobody(code, header)
end

def include_cors_allow_origin
if @origin.nil?
return false
end

if @cors_allow_origins.include?(@origin)
return true
end
Expand Down

0 comments on commit ed85d4f

Please sign in to comment.