Giter Site home page Giter Site logo

shkoliar / magento-ngrok Goto Github PK

View Code? Open in Web Editor NEW
45.0 5.0 22.0 21 KB

Magento 2 module for ngrok.io service support

Home Page: https://shkoliar.com

License: MIT License

PHP 100.00%
magento magento2 magento-2 magento2-module magento2-extension magento-extension magento-module magento-2-extension magento-2-module ngrok

magento-ngrok's People

Contributors

josecruzchavez avatar magentoinova avatar shkoliar avatar u-maxx avatar zifius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

magento-ngrok's Issues

Ngrok changed url

Right now when using ngrok with free version it responds with different url:

  • ngrok-free.app
  • ngrok-free.dev

Additionally you can put your own domain in pro version which is not supported as well.

Incorrect URLs after first page load

I've been able to successfully load the first page of my site, but every link that is generated after that points to my usual localhost URL rather than my ngrok URL.

I notice in StoreBaseUrl::afterGetBaseUrl() that the $result is https://local.mydevsite.com/index.php/en_CA/ and thus isn't getting picked up in the conditional on line 48. That being said, I'm not sure that it's supposed to be since it isn't technically a base URL at that point. I also tried removing the first part of the condition to force it to use the ngrok URL, and that does work, but none of the static assets load, so I'm not able to test properly.

The only other thing I could think of was my nginx config, but I don't see anything obvious there (I've attached it in case you have time to look at it). Do you have any ideas?

I forgot to mention, my Magento version is 2.3.3. I'm sure this works on a clean install, so I'm hoping you might be able to wager a guess as to what I could look at changing.

anon_nginx.txt

Require is not a function

Implementation steps
Local domains:
magento2.local.com

Terminal run:
ngrok http --host-header=magento2.local.com 80

Desire:
The page displays beautifully without losing css style

Please help me, thank you very much!

image
image

Not working with paths

I have Magento installed on localhost/magento2, and when I use this with ngrok it sets the base URL without /magento2 and it breaks the links

infinite redirects

First I want to say thank you for building this and making it public. I very much appreciate it.
I've been having some issues getting this to work correctly.

I'm running magento2 in wamp with a virtual host name 'http://magento.local' which works correctly loading magento at that url. I am not forcing secure url on frontend or admin. When I go to the ngrok 'http://xxx.ngrok.io' url, magento loads the homepage but with all css and js resources broken as they point to the local url of 'http://magento.local and are blocked by cross domain origin'. So of course now I install and enable this module.

with the module installed and enabled and cache cleared, setup upgrade and di compile run. index reindexed etc.

At the Ngrok url http://xxx.ngrok.io the I get an infinite 302 redirect loop back to that same ngrok url

hitting a static php file directly 'http://xxx.ngrok.io/ngroktest/test.php' it does return a successful 200

When I log __METHOD__ at the top of Shkoliar\Ngrok\Plugin\Model::afterGetBaseUrl, I see that the method is running, when I comment out the method, the homepage loads but with all resources blocked pointing to the 'magento.local' path.

I have disabled and cleared all caches, I have run cache:clean and cache:flush, setup:update and di:compile along with index:reindex and static-content:deploy -f. I have deploy mode in developer. I have tried this with rewrite on and off. I have tried clearing browser cache and cookies, and using different browsers I never used before. I am running ngrok like so ngrok http -host-header=magento.local 80

Is there something else I am missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.