It would be great as you suggested in #16 to provide an ability for a client to pass in a token to authenticate to localtunnel server to open the port for it. As it stands right now, anybody can be proxied using localtunnel. While this is great for a public service like localtunnel.me, it may be less desirable for internal/closed localtunnel servers.
const token = req.headers['x-access-token'];
if (token != opt.token) {
res.statusCode = 403;
res.end('Host header is required');
return;
}
as well as updating the options passed and the client of course...
It would be great as you suggested in #16 to provide an ability for a client to pass in a token to authenticate to localtunnel server to open the port for it. As it stands right now, anybody can be proxied using localtunnel. While this is great for a public service like ```localtunnel.me```, it may be less desirable for internal/closed localtunnel servers.
Simple code on https://github.com/localtunnel/server/blob/master/server.js#L121 would probably do it:
```
const token = req.headers['x-access-token'];
if (token != opt.token) {
res.statusCode = 403;
res.end('Host header is required');
return;
}
```
as well as updating the options passed and the client of course...
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
It would be great as you suggested in #16 to provide an ability for a client to pass in a token to authenticate to localtunnel server to open the port for it. As it stands right now, anybody can be proxied using localtunnel. While this is great for a public service like
localtunnel.me, it may be less desirable for internal/closed localtunnel servers.Simple code on https://github.com/localtunnel/server/blob/master/server.js#L121 would probably do it:
as well as updating the options passed and the client of course...