79248000

Date: 2024-12-03 14:34:11
Score: 0.5
Natty:
Report link

I initially tried getting the page from the backend first and then rewriting all the URLs in the HTML, but even after being able to load most resources, the application remained broken.

But it turns out that the specific front-end that I wanted to have in the iframe (GraphDB workbench) exposes a setting that changes the base URL that determines where to look for resources.

I got inspired to look for this setting by the answer provided here: https://serverfault.com/a/561897

Indeed, GraphDB exposes such a setting, as can be found in the documentation: https://graphdb.ontotext.com/documentation/10.0/configuring-graphdb.html#url-properties

So in docker-compose, I added the following for the GraphDB container:

entrypoint: 
- "/opt/graphdb/dist/bin/graphdb"
- "-Dgraphdb.external-url=http://localhost:9000/kgraph/"

After adding this, everything loaded as expected.

This seems to be a general pattern for such admin UIs; they usually expose a setting that allows you to change the base path of the application, so it can fetch its resources properly.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Archer