Description
Currently, PinShare binds to 0.0.0.0 (all interfaces) for the API server and uses localhost for internal health checks. This should be configurable to allow users to:
- Bind to specific network interfaces
- Choose between IPv4 and IPv6
- Restrict API access to specific IPs
Affected Components
internal/api/main_api.go - API server binding
cmd/pinsharesvc/process.go - IPFS configuration (Addresses.API, Addresses.Gateway)
internal/app/app.go - Health check dial addresses
Proposed Solution
Add configuration options for:
api_bind_address - Address for API server to bind to (default: 0.0.0.0)
ipfs_bind_address - Address for IPFS to bind to (default: 127.0.0.1 for API/Gateway, 0.0.0.0 for Swarm)
References
This issue was identified during PR #3 code review.
Description
Currently, PinShare binds to
0.0.0.0(all interfaces) for the API server and useslocalhostfor internal health checks. This should be configurable to allow users to:Affected Components
internal/api/main_api.go- API server bindingcmd/pinsharesvc/process.go- IPFS configuration (Addresses.API, Addresses.Gateway)internal/app/app.go- Health check dial addressesProposed Solution
Add configuration options for:
api_bind_address- Address for API server to bind to (default:0.0.0.0)ipfs_bind_address- Address for IPFS to bind to (default:127.0.0.1for API/Gateway,0.0.0.0for Swarm)References
This issue was identified during PR #3 code review.