holepunchto / pear

combined Peer-to-Peer (P2P) Runtime, Development & Deployment tool
https://pears.com/
Apache License 2.0
85 stars 9 forks source link

Add HTTP/HTTPS hostname whitelisting for Pear desktop apps #203

Closed jkcdarunday closed 1 week ago

jkcdarunday commented 1 week ago

Allows only requests to the sidecar host (127.0.0.1:9342) by default and returns 404 for all other requests. Additional hosts can be whitelisted by listing them as values in the pear.links object in package.json

Example: adding { google: 'https://google.com' } in pear.links will allow all requests to google.com (HTTPS) and all its subpaths (google.com/test etc.)