Pleroma web binds to IPv4 only?
Unless I'm mistaken, it seems like Pleroma.Web.Endpoint
is only binding on IPv4.
This is a problem for modern systems where localhost.
refers to [::0] as well as 127.0.0.1 - as it is, the stock nginx config won't work on some systems that prefer v6 (as it appears to have broken on mine)
I fixed this by pointing my reverse proxy at the v4 loopback, but this may be an issue on v6-only systems where there is no v4 available (if these exist in the real world).
It's probably pretty safe to s/localhost/127.0.0.1/g in the reverse proxy configs - should I do that, or is there a preferred way to ask Elixr to listen on v6 too/instead?
alfie@cumulus:~$ http -h http://127.0.0.1:4000/api/v1/instance
HTTP/1.1 200 OK
access-control-allow-credentials: true
access-control-allow-origin: *
access-control-expose-headers: Link,X-RateLimit-Reset,X-RateLimit-Limit,X-RateLimit-Remaining,X-Request-Id,Idempotency-Key
cache-control: max-age=0, private, must-revalidate
content-length: 443
content-security-policy: default-src 'none'; base-uri 'self'; frame-ancestors 'none'; img-src 'self' data: https:; media-src 'self' https:; style-src 'self' 'unsafe-inline'; font-src 'self'; manifest-src 'self'; connect-src 'self' https://p.cyberdelia.space wss://p.cyberdelia.space; script-src 'self'; upgrade-insecure-requests;
content-type: application/json; charset=utf-8
date: Thu, 23 May 2019 21:23:38 GMT
referrer-policy: same-origin
server: Cowboy
x-content-type-options: nosniff
x-download-options: noopen
x-frame-options: DENY
x-permitted-cross-domain-policies: none
x-request-id: 2mgmplsl6c6n2cid4s006q22
x-xss-protection: 1; mode=block
alfie@cumulus:~$ http -h http://[::0]:4000/api/v1/instance
http: error: ConnectionError: HTTPConnectionPool(host='::0', port=4000): Max retries exceeded with url: /api/v1/instance (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c67d41490>: Failed to establish a new connection: [Errno 111] Connection refused',)) while doing GET request to URL: http://[::0]:4000/api/v1/instance
~a