Skip to content

Comments

Fix: Log requestor ip for api calls#2534

Merged
SReject merged 4 commits intocrowbartools:v5from
codehdn:fix/logClientIP
Jun 29, 2024
Merged

Fix: Log requestor ip for api calls#2534
SReject merged 4 commits intocrowbartools:v5from
codehdn:fix/logClientIP

Conversation

@codehdn
Copy link
Contributor

@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
@SReject SReject merged commit 7de8cf0 into crowbartools:v5 Jun 29, 2024
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.

3 participants