webcomponents / webcomponents.org

Home of the web components community
https://www.webcomponents.org
Apache License 2.0
356 stars 95 forks source link

Catalog search endpoint should be on site server #1416

Closed justinfagnani closed 1 year ago

justinfagnani commented 1 year ago

Right now the search feature hits an endpoint on the catalog server. This is fine if the catalog server is public or not proxied, but if the server it proxied it prevents the client from accessing the catalog server.

The difficulty is that the servers know their own URLs via env variables which point to the real server URLs (ie https://pr1415---site-khswqo4xea-wl.a.run.app/). But the local IAM proxy gives the servers URLs like http://127.0.0.1:6453. The client would have to know this localhost URL for the catalog server, which is unknowable from the server.

Having seach endpoints on the site server solves this and separates site public visibility from catalog public visibility.