mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Realm added for Basic Authentication
This commit is contained in:
		
							parent
							
								
									7ad319c70d
								
							
						
					
					
						commit
						87bbb2069f
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -22,7 +22,9 @@ module Kemal::Middleware | |||
|           end | ||||
|         end | ||||
|       end | ||||
|       HTTP::Response.new(401, "Unauthorized") | ||||
|       headers = HTTP::Headers.new | ||||
|       headers["WWW-Authenticate"] = "Basic realm=\"Login Required\"" | ||||
|       HTTP::Response.new(401, "Could not verify your access level for that URL.\nYou have to login with proper credentials", headers, nil, "HTTP/1.1", nil) | ||||
|     end | ||||
| 
 | ||||
|     def authorized?(value) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue