Skip to content

add hostname to listen method #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matteo-kl
Copy link
Contributor

Modified the Express server configuration to explicitly bind to the specified hostname instead of listening on all network interfaces (0.0.0.0). This change improves security by limiting server access to the intended hostname only (defaults to 'localhost').

Changes

Updated app.listen() to use both port and hostname parameters
Default hostname remains 'localhost' for local development
Prevents unintended external access to the SSE server

Before

Server would listen on all network interfaces (0.0.0.0)

After

Server only listens on the specified hostname (defaults to localhost)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants