Giter Site home page Giter Site logo

Comments (10)

progrium avatar progrium commented on July 28, 2024

I have this problem in situations where it redirects as well. There isn't a good solution I can think off, especially when it wants to redirect to another port. You'll have to figure out how to work around it, or help me come up with something viable for localtunnel (listening on all ports is not viable).

from localtunnel.

jayfresh avatar jayfresh commented on July 28, 2024

How about listening on some of the more common ports? 8888, 8000, 3000, 8080?

from localtunnel.

progrium avatar progrium commented on July 28, 2024

That might work. I wish we could come up with something better though.

from localtunnel.

nirvdrum avatar nirvdrum commented on July 28, 2024

My head is a bit foggy at the moment, but is this the same problem I just fixed and was merged into master?

from localtunnel.

progrium avatar progrium commented on July 28, 2024

I think it is. jayfresh, you want to try with the latest version?

from localtunnel.

jayfresh avatar jayfresh commented on July 28, 2024

Unfortunately, I can't at the moment because of #3

from localtunnel.

kevinburke avatar kevinburke commented on July 28, 2024

I ran into this problem today trying to show my friends a new Wordpress theme. I worked around it by disabling Web Sharing, setting the MAMP port to 80 and then changing the site URL in Wordpress to be http://localhost instead of http://localhost:8888. While the site URL was hardcoded in my local Wordpress as localhost:8888, my computer kept responding to requests for http://xxxx.localtunnel.com/$1 with a redirect to http://xxxx.localtunnel.com:8888/$1.

nirvdrum, I tested MAMP with and without your changeset and the issue was present in both cases. The version of localtunnel available through Rubygems doesn't include that changeset, I edited the source.

On a tangent, Wordpress doesn't do well with relative URL's (see some discussion here http://wordpress.org/support/topic/wordpress-and-relative-urls), so calls like this:

<?php bloginfo('stylesheet_url'); ?>

will echo http://localhost/path/to/style.css onto the page, which will fail over localtunnel even when running on port 80. The other part that's tricky is this will continue to look OK on your machine and not on your friend's. I had to hardcode relative URL's to load external files.

from localtunnel.

aboutaaron avatar aboutaaron commented on July 28, 2024

@kevinburke's method worked for me, though I'm curious, why doesn't localhost:8888 work? I tried exposing port 8888 with showoff.io (out of curiosity) and ran into the same issue. As a newbie dev, can someone explain this to me? Thanks!

from localtunnel.

progrium avatar progrium commented on July 28, 2024

I've decided this is out of the scope of localtunnel. If your app/server is unable to be configured for or work with dynamic domains/ports, then localtunnel will not be able to work for you.

from localtunnel.

mLuby avatar mLuby commented on July 28, 2024

Thanks @kevinburke !

from localtunnel.

Related Issues (20)

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.