mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Add handling of OPTIONS request to /api namespace
* It allows access from anywhere via wildcard origin * It sets the timeout to an hour * It allows all standard HTTP verbs + OPTIONS
This commit is contained in:
parent
c148c7e0c0
commit
58c928226d
4 changed files with 51 additions and 0 deletions
|
@ -28,6 +28,13 @@ class ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
# Allows testing OPTIONS request just like GET or POST
|
||||
module ActionDispatch::Integration::RequestHelpers
|
||||
def options(path, parameters = nil, headers_or_env = nil)
|
||||
process :options, path, parameters, headers_or_env
|
||||
end
|
||||
end
|
||||
|
||||
class ApplicationIntegrationTest < ActionDispatch::IntegrationTest
|
||||
include Capybara::DSL
|
||||
include Capybara::Minitest::Assertions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue