mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-10-31 12:42:09 +00:00 
			
		
		
		
	Remove patch and update file structure
This commit is contained in:
		| @@ -1,29 +0,0 @@ | ||||
| # See https://github.com/crystal-lang/crystal/pull/5408 | ||||
| module HTTP | ||||
|   class Cookie | ||||
|     module Parser | ||||
|       SetCookieStringFix = /^#{Regex::CookiePair}(?:;\s*#{Regex::CookieAV})*$/ | ||||
|  | ||||
|       def parse_set_cookie(header) | ||||
|         match = header.match(SetCookieStringFix) | ||||
|         return unless match | ||||
|  | ||||
|         expires = if max_age = match["max_age"]? | ||||
|                     Time.now + max_age.to_i.seconds | ||||
|                   else | ||||
|                     parse_time(match["expires"]?) | ||||
|                   end | ||||
|  | ||||
|         Cookie.new( | ||||
|           match["name"], match["value"], | ||||
|           path: match["path"]? || "/", | ||||
|           expires: expires, | ||||
|           domain: match["domain"]?, | ||||
|           secure: match["secure"]? != nil, | ||||
|           http_only: match["http_only"]? != nil, | ||||
|           extension: match["extension"]? | ||||
|         ) | ||||
|       end | ||||
|     end | ||||
|   end | ||||
| end | ||||
| @@ -20,8 +20,7 @@ require "option_parser" | ||||
| require "pg" | ||||
| require "xml" | ||||
| require "yaml" | ||||
| require "./cookie_fix" | ||||
| require "./helpers" | ||||
| require "./invidious/*" | ||||
|  | ||||
| CONFIG = Config.from_yaml(File.read("config/config.yml")) | ||||
|  | ||||
|   | ||||
| @@ -10,11 +10,11 @@ macro add_mapping(mapping) | ||||
| end | ||||
| 
 | ||||
| macro templated(filename) | ||||
|   render "src/views/#{{{filename}}}.ecr", "src/views/layout.ecr" | ||||
|   render "src/invidious/views/#{{{filename}}}.ecr", "src/invidious/views/layout.ecr" | ||||
| end | ||||
| 
 | ||||
| macro rendered(filename) | ||||
|   render "src/views/#{{{filename}}}.ecr" | ||||
|   render "src/invidious/views/#{{{filename}}}.ecr" | ||||
| end | ||||
| 
 | ||||
| class Config | ||||
		Reference in New Issue
	
	Block a user
	 Omar Roth
					Omar Roth