Open giorgiosironi opened 4 years ago
Thinking about it, using a different origin to the 'real' one won't work unless clients then rewrite it if re-exposing it elsewhere, which seems thorny and dangerous.
To add a bit more meat to the bones of the example, if we have a Docker Compose setup of:
http://localhost:8082
, internal at http://article-store:8080
)http://localhost:8082
)http://article-store:8080
)If http://localhost:8082
would be considered the real origin, the Web App needs to know to request http://article-store:8080
when it sees http://localhost:8082
(or equivalent) somehow.
Less of a problem in a real setup (since localhost
isn't involved). If the public Article Store origin is a CDN, both the Hydra Console and Web App would be able to use it and benefit from caching, though at a bandwidth expense (unless using the same cloud provider) and potential increase of latency.
Think we should still persist relative IRIs though, but it's far less important.
Wonder how multi-tenancy affects this: could be that http://publisher-a-article-store/
and http://publisher-b-article-store/
are both accessible, so IRIs can't be persisted relative.
The Article Store might be accessed through various origins (eg
http://localhost:8080/
,http://article-store:8080
); IRIs are currently persisted as absolute so can only be accessed through the origin that they were also created on (eghttp://localhost:8080/some-iri
). Storing them as relative IRIs (eg/some-iri
) and making them absolute at runtime allows them to be accessed through any origin.Definition of Done:
localhost
and a proxy.Related
Tasks