![](/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.