Skip to content

Commit

Permalink
Update proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
karreiro committed Apr 22, 2024
1 parent a70ec32 commit cdbc456
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ class DevServer
]

class Proxy
SESSION_COOKIE_NAME = "_secure_session_id"
SESSION_COOKIE_REGEXP = /#{SESSION_COOKIE_NAME}=(\h+)/

SESSION_COOKIE_NAME = "_shopify_essential"
SESSION_COOKIE_REGEXP = /#{SESSION_COOKIE_NAME}=:(.+):;/
SESSION_COOKIE_MAX_AGE = 60 * 60 * 23 # 1 day - leeway of 1h
IGNORED_ENDPOINTS = %w[
shopify/monorail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def liquid_template
end

def cookie
@cookie ||= "storefront_digest=#{repl.storefront_digest}; _secure_session_id=#{repl.secure_session_id}"
@cookie ||= "storefront_digest=#{repl.storefront_digest}; #{DevServer::Proxy::SESSION_COOKIE_NAME}=#{repl.secure_session_id}"
end

def shop
Expand Down

0 comments on commit cdbc456

Please sign in to comment.