Skip to content

Commit

Permalink
Respect LIVEBOOK_BASE_URL_PATH when checking /public assets availabil…
Browse files Browse the repository at this point in the history
…ity (#2700)

Co-authored-by: Jonatan Kłosko <[email protected]>
  • Loading branch information
elepedus and jonatanklosko committed Jul 5, 2024
1 parent f2a93b9 commit c8db798
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/js/hooks/js_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,11 @@ const JSView = {
* once and the response is cached.
*/
function cachedPublicEndpointCheck() {
const healthUrl = window.LIVEBOOK_BASE_URL_PATH + "/public/health";

cachedPublicEndpointCheck.promise =
cachedPublicEndpointCheck.promise ||
fetch("/public/health")
fetch(healthUrl)
.then((response) => response.status === 200)
.catch((error) => false);

Expand Down

0 comments on commit c8db798

Please sign in to comment.