Skip to content

Commit

Permalink
Use a stub for CORS example
Browse files Browse the repository at this point in the history
  • Loading branch information
sdogruyol authored Aug 15, 2019
1 parent 66dd16f commit 51e997d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _cookbook/code/cors/app.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require "kemal"

static_headers do |response, filepath, filestat|
if filepath =~ /\.html$/
response.headers.add("Access-Control-Allow-Origin", "*")
response.headers.add("Access-Control-Allow-Origin", "example.com")
end
response.headers.add("Content-Size", filestat.size.to_s)
end
Expand Down

0 comments on commit 51e997d

Please sign in to comment.