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]