Utiliser des URLs complètes pour SE_ALLOWED_INSTANCE_DOMAINS
En local, cette URL génère une erreur 500 : http://localhost:3080/generique/export/localhost:3000/61b9b41412429c1a2fcce0bd/61b9b41412429c1a2fcce0bd/?with_toc=0&with_ascii=0&csl=chicagomodified&formats=originals&formats=images&formats=html
Avec comme configuration :
SE_ALLOWED_INSTANCE_DOMAINS=localhost:3000,localhost:3030,graphql-stylo:3030
Et comme images :
davidbgk/pandoc-api:0.0.9
davidbgk/stylo-export:0.0.5
Et la stack trace :
stylo-export-gateway-1 | [2022-12-12 15:13:25,922] ERROR in app: Exception on /generique/export/localhost:3000/61b9b41412429c1a2fcce0bd/61b9b41412429c1a2fcce0bd/ [GET]
stylo-export-gateway-1 | Traceback (most recent call last):
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions
stylo-export-gateway-1 | yield
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpcore/backends/sync.py", line 86, in connect_tcp
stylo-export-gateway-1 | sock = socket.create_connection(
stylo-export-gateway-1 | File "/usr/local/lib/python3.9/socket.py", line 844, in create_connection
stylo-export-gateway-1 | raise err
stylo-export-gateway-1 | File "/usr/local/lib/python3.9/socket.py", line 832, in create_connection
stylo-export-gateway-1 | sock.connect(sa)
stylo-export-gateway-1 | OSError: [Errno 99] Cannot assign requested address
stylo-export-gateway-1 |
stylo-export-gateway-1 | During handling of the above exception, another exception occurred:
stylo-export-gateway-1 |
stylo-export-gateway-1 | Traceback (most recent call last):
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
stylo-export-gateway-1 | yield
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_transports/default.py", line 218, in handle_request
stylo-export-gateway-1 | resp = self._pool.handle_request(req)
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpcore/_sync/connection_pool.py", line 253, in handle_request
stylo-export-gateway-1 | raise exc
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpcore/_sync/connection_pool.py", line 237, in handle_request
stylo-export-gateway-1 | response = connection.handle_request(request)
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpcore/_sync/connection.py", line 86, in handle_request
stylo-export-gateway-1 | raise exc
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpcore/_sync/connection.py", line 63, in handle_request
stylo-export-gateway-1 | stream = self._connect(request)
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpcore/_sync/connection.py", line 111, in _connect
stylo-export-gateway-1 | stream = self._network_backend.connect_tcp(**kwargs)
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpcore/backends/sync.py", line 86, in connect_tcp
stylo-export-gateway-1 | sock = socket.create_connection(
stylo-export-gateway-1 | File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
stylo-export-gateway-1 | self.gen.throw(typ, value, traceback)
stylo-export-gateway-1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
stylo-export-gateway-1 | raise to_exc(exc)
stylo-export-gateway-1 | httpcore.ConnectError: [Errno 99] Cannot assign requested address