File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 5
5
* Your contribution here.
6
6
7
7
#### Fixes
8
-
8
+ * [ # 1993 ] ( https://github.com/ruby-grape/grape/pull/1993 ) : Lazy join allow header - [ @ ericproulx ] ( https://github.com/ericproulx ) .
9
9
* [ #1987 ] ( https://github.com/ruby-grape/grape/pull/1987 ) : Re-add exactly_one_of mutually exclusive error message - [ @ZeroInputCtrl ] ( https://github.com/ZeroInputCtrl ) .
10
10
* [ #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 ) .
11
11
* [ #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
227
227
allowed_methods |= [ Grape ::Http ::Headers ::HEAD ] if allowed_methods . include? ( Grape ::Http ::Headers ::GET )
228
228
end
229
229
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 )
231
231
232
232
unless self . class . namespace_inheritable ( :do_not_route_options ) || allowed_methods . include? ( Grape ::Http ::Headers ::OPTIONS )
233
233
config [ :endpoint ] . options [ :options_route_enabled ] = true
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ def transaction(env)
106
106
env ,
107
107
neighbor . allow_header ,
108
108
neighbor . endpoint
109
- ) if neighbor && method == ' OPTIONS' && !cascade
109
+ ) if neighbor && method == Grape :: Http :: Headers :: OPTIONS && !cascade
110
110
111
111
route = match? ( input , '*' )
112
112
return neighbor . endpoint . call ( env ) if neighbor && cascade && route
@@ -160,7 +160,7 @@ def greedy_match?(input)
160
160
end
161
161
162
162
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 ( ', ' )
164
164
endpoint . call ( env )
165
165
end
166
166
You can’t perform that action at this time.
0 commit comments