Allow setting a custom HTTP method in CacheBuster (#26528)
Co-authored-by: Jorijn Schrijvershof <jorijn@jorijn.com>
This commit is contained in:
		
							
								
								
									
										10
									
								
								lib/http_extensions.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								lib/http_extensions.rb
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
# Monkey patching until https://github.com/httprb/http/pull/757 is merged
 | 
			
		||||
unless HTTP::Request::METHODS.include?(:purge)
 | 
			
		||||
  module HTTP
 | 
			
		||||
    class Request
 | 
			
		||||
      METHODS = METHODS.dup.push(:purge).freeze
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
		Reference in New Issue
	
	Block a user