The credential ships with the frontend. Anyone who can load the page can read it and query the data directly.
The browser never holds the credential. The proxy checks who is asking, applies the secret on the server and logs the call. Requests without a valid session stop there.