question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Only support top level domain

See original GitHub issue

It not works when host domain is not top level domain. I want to use subdomain as base domain described in https://github.com/localtunnel/server#use-your-server, such as subdomain.example.com and *.subdomain.example.com. This issue is similar to #21.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
boriscommented, Nov 4, 2015

@worg sounds good. In fact, I found a workaround with the following modification on the server.js; (here’s the diff)

diff --git a/server.js b/server.js
index 17c2d9f..52db061 100644
--- a/server.js
+++ b/server.js
@@ -41,8 +41,11 @@ function maybe_bounce(req, res, bounce) {
         return false;
     }

-    var subdomain = tldjs.getSubdomain(hostname);
-    if (!subdomain) {
+    var subdomain = hostname.split(".")[0];
+    console.log(subdomain)
+
+    //var subdomain = tldjs.getSubdomain(hostname);
+    if (subdomain === 'tunnel') {
         return false;
     }

But, I believe a startup flag is a better solution.

0reactions
defunctzombiecommented, Dec 12, 2017

There are a few PRs out to solve this issue; once those merge this will be resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top-level domain - Wikipedia
A top-level domain (TLD) is one of the domains at the highest level in the hierarchical Domain Name System of the Internet after...
Read more >
List of Top-Level Domains - ICANN
List of Top-Level Domains. A list of all valid top-level domains is maintained by the IANA and is updated from time to time....
Read more >
What is a top-level domain? - Cloudflare
Top -level Domains (TLDs) are the final sections of domain names. Different domain name registrars have access to different TLDs.
Read more >
What Is a TLD? Top-Level Domains Explained - Kinsta
A TLD, short for top-level domain, is the last segment of a domain name ... The support is rapid and outstanding, and their...
Read more >
Can a website ONLY have a generic top level domain
These are country code TLDs, but the point is that DNS as a technology does support "dotless" domains. However, it appears that most...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found