File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 55* Your contribution here.
66
77#### Fixes
8-
8+ * [ # 1993 ] ( https://github.com/ruby-grape/grape/pull/1993 ) : Lazy join allow header - [ @ ericproulx ] ( https://github.com/ericproulx ) .
99* [ #1987 ] ( https://github.com/ruby-grape/grape/pull/1987 ) : Re-add exactly_one_of mutually exclusive error message - [ @ZeroInputCtrl ] ( https://github.com/ZeroInputCtrl ) .
1010* [ #1977 ] ( https://github.com/ruby-grape/grape/pull/1977 ) : Skip validation for a file if it is optional and nil - [ @dnesteryuk ] ( https://github.com/dnesteryuk ) .
1111* [ #1976 ] ( https://github.com/ruby-grape/grape/pull/1976 ) : Ensure classes/modules listed for autoload really exist - [ @dnesteryuk ] ( https://github.com/dnesteryuk ) .
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ def add_head_not_allowed_methods_and_options_methods
227227 allowed_methods |= [ Grape ::Http ::Headers ::HEAD ] if allowed_methods . include? ( Grape ::Http ::Headers ::GET )
228228 end
229229
230- allow_header = ( self . class . namespace_inheritable ( :do_not_route_options ) ? allowed_methods : [ Grape ::Http ::Headers ::OPTIONS ] | allowed_methods ) . join ( ', ' )
230+ allow_header = ( self . class . namespace_inheritable ( :do_not_route_options ) ? allowed_methods : [ Grape ::Http ::Headers ::OPTIONS ] | allowed_methods )
231231
232232 unless self . class . namespace_inheritable ( :do_not_route_options ) || allowed_methods . include? ( Grape ::Http ::Headers ::OPTIONS )
233233 config [ :endpoint ] . options [ :options_route_enabled ] = true
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ def transaction(env)
106106 env ,
107107 neighbor . allow_header ,
108108 neighbor . endpoint
109- ) if neighbor && method == ' OPTIONS' && !cascade
109+ ) if neighbor && method == Grape :: Http :: Headers :: OPTIONS && !cascade
110110
111111 route = match? ( input , '*' )
112112 return neighbor . endpoint . call ( env ) if neighbor && cascade && route
@@ -160,7 +160,7 @@ def greedy_match?(input)
160160 end
161161
162162 def call_with_allow_headers ( env , methods , endpoint )
163- env [ Grape ::Env ::GRAPE_ALLOWED_METHODS ] = methods
163+ env [ Grape ::Env ::GRAPE_ALLOWED_METHODS ] = methods . join ( ', ' )
164164 endpoint . call ( env )
165165 end
166166
You can’t perform that action at this time.
0 commit comments