![](/img/trans.png)
[英]Configuring a Rails 4 app for production in a subdirectory under Apache
[英]Rails app in subdirectory in production not redirecting properly to install shopify store
使用localhost:3000,我能夠安裝shopify商店並與其進行交互。 但是,將其部署到子目錄(www.website.com/app_name)中的生產環境中時,商店的“登錄”將重定向到root而不是子目錄。 我在shopify應用儀表板中將重定向URL列入了白名單。
在omniauth.rb中
callback_url: "http://{domain}/{app_name}/auth/shopify/callback"
在routes.rb中
mount ShopifyApp::Engine, at: '/{app_name}'
除了上面的代碼,shopify的設置是生成器創建的設置。 有關如何解決此問題的任何想法?
坦克!
當我執行該模式時,我必須在適用於此的舊config.ru中設置OmniAuth ...的前綴。
use OmniAuth::Builder do
# allow us to connect this App via the /fooblefuzz route instead of just
the root of the heroku app URL /
configure do |config|
config.path_prefix = '/fooblefuzz/auth'
end
因此,此代碼可用作https://www.example.com/fooblefuzz/auth/shopify/callback
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.