forked from midou/invidious
Remove patch and update file structure
This commit is contained in:
1 parent
a789114f43
commit
eb1df96e1b
14 files changed
+3
-33
No files matched your search
@@ -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
|
||||
+1
-2
@@ -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
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user