Skip to content

Commit

Permalink
Merge pull request #1794 from uurcank/splash-page-redirect-fix
Browse files Browse the repository at this point in the history
Fix and Refactor splash page URL Handling to Respect Nested URLs
  • Loading branch information
paulomarg authored Feb 21, 2024
2 parents 7381bb6 + 2390c52 commit 2a75c07
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ def splash_page
end

def splash_page_with_params(params)
uri = URI(root_path)
uri = URI(base_url)
uri.query = params.compact.to_query
uri.to_s
end

def base_url
ShopifyApp.configuration.root_url.presence || root_path
end

def redirect_to_splash_page
redirect_to(splash_page)
rescue ::ShopifyApp::ShopifyDomainNotFound => error
Expand Down

0 comments on commit 2a75c07

Please sign in to comment.