Reverse proxy base missing part behind / #95
Replies: 2 comments 7 replies
-
We had a look at what you did. I'm not sure if we fully understand it, I think it would be easier to have a quick call on what you try to do and where the data is coming from. Would that be ok? |
Beta Was this translation helpful? Give feedback.
-
It should be possible to use the rewrite feature. Usually, it is used for developer environments, but it should be worth trying to add the following lines to your config.json: {
"datasetBaseUrl": "https://labs.kadaster.nl/",
"handler": {
"root": {
"module": "trifid-handler-sparql",
"path": "/trifid-kg/",
"options": {
"resourceExistsQuery": "ASK { <${iri}> ?p ?o }",
"resourceGraphQuery": "DESCRIBE <${iri}>",
"containerExistsQuery": "ASK { ?s a ?o. FILTER REGEX(STR(?s), \"^${iri}\") }",
"containerGraphQuery": "CONSTRUCT { ?s a ?o. } WHERE { ?s a ?o. FILTER REGEX(STR(?s), \"^${iri}\") }"
}
}
}
}
The rewrite feature is not recommended for production instances. There is a slight performance decrease, and there can be issues with the SPARQL proxy. |
Beta Was this translation helpful? Give feedback.
-
Hi,
We use Trifid on our server with reverse proxy for the dereferencing with the base URL ‘[https://labs.kadaster.nl/trifid-kg/’]. Unfortunately the links on this page to other items with the same sparqlEndpointUrl and datasetBaseUrl start with ‘[https://labs.kadaster.nl/’] (without the ‘trifid-kg’). We tried using the ‘X-Forwarded-Host’ parameter for the reverse proxy, but without wanted result.
(For now we adjusted the function ‘renderLink’ in the render-ls.js, to add the ‘trifid-kg’. But this is not a clean solution and it is only for links)
Is there perhaps an example how other users solved this issue? Thanks in advance for the help!
Example:
[https://labs.kadaster.nl/trifid-kg/kadaster/kg/id/geo-shape/bag-0200100000001088]
Beta Was this translation helpful? Give feedback.
All reactions