mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-02-10 18:05:10 +08:00
ruby: fix cors
This commit is contained in:
@ -44,3 +44,5 @@ end
|
||||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
|
||||
gem 'uuid'
|
||||
|
||||
gem 'rack-cors'
|
||||
@ -102,6 +102,7 @@ GEM
|
||||
nokogiri (1.10.10-x64-mingw32)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
rack (2.2.3)
|
||||
rack-cors (1.1.1)
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (6.0.3.3)
|
||||
@ -186,6 +187,7 @@ DEPENDENCIES
|
||||
coffee-rails (~> 5.0.0)
|
||||
jbuilder (~> 2.9.1)
|
||||
jquery-rails
|
||||
rack-cors
|
||||
rails (= 6.0.3.3)
|
||||
sass-rails (~> 6.0)
|
||||
sdoc (~> 0.4.0)
|
||||
|
||||
@ -2,3 +2,14 @@
|
||||
|
||||
require ::File.expand_path('../config/environment', __FILE__)
|
||||
run Rails.application
|
||||
|
||||
require 'rack/cors'
|
||||
use Rack::Cors do
|
||||
|
||||
allow do
|
||||
origins '*'
|
||||
resource '*',
|
||||
:headers => :any,
|
||||
:methods => [:get]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user