Skip to content
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

Fix: Log requestor ip for api calls #2534

Open
wants to merge 2 commits into
base: v5
Choose a base branch
from

Conversation

codehdn
Copy link

@codehdn codehdn commented Apr 29, 2024

Description of the Change

Changed from using req.headers.host to using req.socket.remoteAddress

Applicable Issues

#2519

Testing

  • Start firebot on this branch
  • open the developer tools (you can also see this log in the terminal you started firebot from)
  • make a request from another device to ${your_devices_local_ip}:7472/api/v1/status
  • verify the logging is using the ip of the second device and not the device firebot is running on
  • log should look like: info: API Request from: 192.168.1.65, for path: /api/v1/status

Screenshots

@codehdn codehdn requested a review from ebiggz as a code owner April 29, 2024 01:26
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.

None yet

2 participants