spolu / breach_core

A Browser written in JS. Free. Modular. Hackable.
https://breach.github.io/breach_core/
MIT License
5.39k stars 411 forks source link

New port for module every time I open Breach #200

Closed johman10 closed 10 years ago

johman10 commented 10 years ago

Hi there,

I'm working on a newtab module that is a lookalike of Momentum for Google Chrome. You can see the progress on my Github.

Since I don't want to make exactly the same thing as Momentum is. I would like to add a calendar for the day. This calendar is linked to Google Calendar. That way there is no configuration, only a log in.

The problem is that Google wants to have a domain inclusive port number to verify the origin. But whenever I close Breach I get a new port for the module. Is it possible to have the same port every time I open Breach?

Thanks in advance!

Greetings, Johman10

morganrallen commented 10 years ago

index.js line 53

var http_srv = http.createServer(app).listen(0, '127.0.0.1');

Calling listen with (port) 0 will assign a random port. Calling a non-random port may carry a security concern.

johman10 commented 10 years ago

Wow, that was easier then I thought! Thanks!