From: Shin Adachi Date: Mon, 24 Apr 2017 18:19:51 +0000 (+0900) Subject: add `patch` method support to CORS (#2408) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=bc955eaf61ffb2fd3915067da2a5674ea30df226;p=mastodon.git add `patch` method support to CORS (#2408) --- diff --git a/config/application.rb b/config/application.rb index 3db8558de..dddc3e4fb 100644 --- a/config/application.rb +++ b/config/application.rb @@ -64,7 +64,7 @@ module Mastodon allow do origins '*' - resource '/api/*', headers: :any, methods: [:post, :put, :delete, :get, :options], credentials: false, expose: ['Link', 'X-RateLimit-Reset', 'X-RateLimit-Limit', 'X-RateLimit-Remaining', 'X-Request-Id'] + resource '/api/*', headers: :any, methods: [:post, :put, :delete, :get, :patch, :options], credentials: false, expose: ['Link', 'X-RateLimit-Reset', 'X-RateLimit-Limit', 'X-RateLimit-Remaining', 'X-Request-Id'] resource '/oauth/token', headers: :any, methods: [:post], credentials: false end end