mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:33:05 +08:00
fixed 修改跨域方式
This commit is contained in:
@@ -40,9 +40,10 @@ 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]
|
||||
resource '/*', :headers => :any, :methods => [:get, :post, :delete, :options, :put], credentials: true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user