From 5e8809f60e854eade79c8187569b6e31c2347540 Mon Sep 17 00:00:00 2001 From: Miles Zhang Date: Tue, 2 Apr 2024 18:55:51 +0800 Subject: [PATCH] chore: add localhost cors for debugger (#1734) Signed-off-by: Miles Zhang --- config/initializers/cors.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index fe507da1c..4156714a9 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -19,6 +19,7 @@ allow do origins ["https://explorer.nervos.org", "https://pudge.explorer.nervos.org", + "http://localhost:3000", /\Ahttps:\/\/ckb-explorer-.*-magickbase.vercel.app\z/] + ENV["PARTNER_DOMAINS"].to_s.split(",").map(&:strip).map { |x| x.start_with?("/") ? Regexp.new(x[1..-2]) : x } resource "*", headers: :any, methods: %i[get post put head options]