drkane / datasette-reconcile

Adds a reconciliation API endpoint to Datasette, based on the Reconciliation Service API specification.
MIT License
22 stars 6 forks source link

view URL should be absolute #18

Closed JBPressac closed 3 years ago

JBPressac commented 3 years ago

Hello, Thank you for v0.2.0 release. It works fine with OpenRefine. However, the suggested alignments have no active links (the tags have no href):

2021-03-30 10_10_20-Window

This is probably due to the fact that the url of the view in the manifest should be absolute:

"view": {"url": "http://www.example.com/database/table/{{id}}"}

the current version looks like:

"view": {"url": "/database/table/{{id}}"}

Might be solved using https://docs.datasette.io/en/stable/internals.html?highlight=absolute#absolute-url-request-path in get_view_url ?

https://github.com/drkane/datasette-reconcile/blob/7492d1eb71e1002d32ae6daba26eecdea4945712/datasette_reconcile/utils.py#L104

JBPressac commented 3 years ago

Problem solved with v0.2.1 release, thank you.

For information, if Datasette is running behind an Apache proxy, the ProxyPreserveHost directive should be set to On, otherwise, "view" returns the URL of the localhost:

"view": {"url": "http://127.0.0.1:8001/database/table/{{id}