A space to discuss online store customization, theme development, and Liquid templating.
Hello,
I am working on Shopify Private app in the Laravel framework. In this app, I am using the Shopify app proxy concept. I have created a custom page in the app which I want the show to the customer. I have added a custom app page link in the Shopify app proxy URL. Everything is working fine except one thing that is proxy URL.
Whenever I have tried to open my app proxy URL by a direct hit in the browser then it will redirect me to my app server's URL. I have to debug this issue but didn't find any solution. Here's the example of my issue for more clarification:-
Example:-
My App custom page URL is https://testserver.in/secure
My App proxy URL is https://teststore.myshopify.com/a/secure
When directly hit above link in the browser then it will redirect me to below link:-
I have searched regarding this and most of the search results said that this issue comes in the Laravel framework and my app is also in the Laravel framework. Please help me with this.
Thanks,
You would need to create a route by name "secure" in web.php and call controller and return view.
Thanks for the reply. I have already added a route in web.php and also create a function in the controller from where I call the view file. For more details, Check Screenshots.
I have this problem too.
if you solved this problem, please help me. I'm facing the same problem.
thanks in advance
I have fixed it.
just remove the following line of code from public/.htaccess
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
Thank you for this posting. That redirect is comming in Laravel package default installation and if you run apache, since .htaccess is used by apache(httpd) only. Now that I've removed 301 redirect from this file, it's working great and I'm getting just one POST call from App proxy instead of 3 calls with redirects before.
Thank you for help.