fixed 修改跨域方式

This commit is contained in:
“xxq250” 2022-07-19 17:48:32 +08:00
parent 80ec79eb59
commit c14cfdeca7
1 changed files with 50 additions and 49 deletions

View File

@ -40,7 +40,8 @@ module Gitlink
config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
# origins '*'
origins /http:\/\/localhost(:\d+)?\z/, /^(http|https):\/\/(.*(gitlink.org.cn))$/
# location of your api
resource '/*', :headers => :any, :methods => [:get, :post, :delete, :options, :put, :patch]
end