{"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974701788", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974701788, "node_id": "IC_kwDOBm6k_c46GMTc", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-20T19:42:29Z", "updated_at": "2021-11-20T19:42:29Z", "author_association": "OWNER", "body": "> I think what's happening here is Apache is actually making a request to `/fixtures` rather than making a request to `/prefix/fixtures` - and Datasette is replying to requests on both the prefixed and the non-prefixed paths.\r\n> \r\n> This is pretty confusing! I think Datasette should ONLY reply to `/prefix/fixtures` instead and return a 404 for `/fixtures` - this would make things a whole lot easier to debug.\r\n> \r\n> But shipping that change could break existing deployments. Maybe that should be a breaking change for 1.0.\r\n\r\nOn further thought I'm not going to do this. Having Datasette work behind a proxy the way it does right now is clearly easy for people to deploy (now that I've fixed the bugs) and I trust my improved tests to catch problems in the future.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974697824", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974697824, "node_id": "IC_kwDOBm6k_c46GLVg", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-20T19:11:21Z", "updated_at": "2021-11-20T19:11:21Z", "author_association": "OWNER", "body": "OK, i think I got all of them this time!\r\n\r\nThe latest demo is now live at https://datasette-apache-proxy-demo.fly.dev/prefix/fixtures/sortable?_facet=pk2\r\n\r\nI'm closing this issue, but feel free to re-open it if you spot any that I missed.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974562942", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974562942, "node_id": "IC_kwDOBm6k_c46FqZ-", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-20T00:59:32Z", "updated_at": "2021-11-20T00:59:32Z", "author_association": "OWNER", "body": "Ouch a nasty bug crept through there - https://datasette-apache-proxy-demo-j7hipcg4aq-uc.a.run.app/prefix/fixtures/compound_three_primary_keys says\r\n\r\n> 500: name 'ds' is not defined", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974561593", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974561593, "node_id": "IC_kwDOBm6k_c46FqE5", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-20T00:53:19Z", "updated_at": "2021-11-20T00:53:19Z", "author_association": "OWNER", "body": "Adding that test found (I hope!) all of the remaining `base_url` bugs. There were a bunch! I think I finally get to close #838 too.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974559176", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974559176, "node_id": "IC_kwDOBm6k_c46FpfI", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-20T00:42:08Z", "updated_at": "2021-11-20T00:42:08Z", "author_association": "OWNER", "body": "> In the meantime I can catch these errors by changing the test to run each path twice, once with and once without the prefix. This should accurately simulate how Apache is working here.\r\n\r\nThis worked, I managed to get the tests to fail! Here's the change I made:\r\n\r\n```diff\r\ndiff --git a/tests/test_html.py b/tests/test_html.py\r\nindex f24165b..dbdfe59 100644\r\n--- a/tests/test_html.py\r\n+++ b/tests/test_html.py\r\n@@ -1614,12 +1614,19 @@ def test_metadata_sort_desc(app_client):\r\n \"/fixtures/compound_three_primary_keys/a,a,a\",\r\n \"/fixtures/paginated_view\",\r\n \"/fixtures/facetable\",\r\n+ \"/fixtures?sql=select+1\",\r\n ],\r\n )\r\n-def test_base_url_config(app_client_base_url_prefix, path):\r\n+@pytest.mark.parametrize(\"use_prefix\", (True, False))\r\n+def test_base_url_config(app_client_base_url_prefix, path, use_prefix):\r\n client = app_client_base_url_prefix\r\n- response = client.get(\"/prefix/\" + path.lstrip(\"/\"))\r\n+ path_to_get = path\r\n+ if use_prefix:\r\n+ path_to_get = \"/prefix/\" + path.lstrip(\"/\")\r\n+ response = client.get(path_to_get)\r\n soup = Soup(response.body, \"html.parser\")\r\n+ if path == \"/fixtures?sql=select+1\":\r\n+ assert False\r\n for el in soup.findAll([\"a\", \"link\", \"script\"]):\r\n if \"href\" in el.attrs:\r\n href = el[\"href\"]\r\n@@ -1642,11 +1649,12 @@ def test_base_url_config(app_client_base_url_prefix, path):\r\n # If this has been made absolute it may start http://localhost/\r\n if href.startswith(\"http://localhost/\"):\r\n href = href[len(\"http://localost/\") :]\r\n- assert href.startswith(\"/prefix/\"), {\r\n+ assert href.startswith(\"/prefix/\"), json.dumps({\r\n \"path\": path,\r\n+ \"path_to_get\": path_to_get,\r\n \"href_or_src\": href,\r\n \"element_parent\": str(el.parent),\r\n- }\r\n+ }, indent=4, default=repr)\r\n \r\n \r\n def test_base_url_affects_metadata_extra_css_urls(app_client_base_url_prefix):\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974558267", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974558267, "node_id": "IC_kwDOBm6k_c46FpQ7", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-20T00:37:57Z", "updated_at": "2021-11-20T00:37:57Z", "author_association": "OWNER", "body": "Thanks to #1522 I have a live demo that exhibits this bug now: https://apache-proxy-demo.datasette.io/prefix/fixtures/attraction_characteristic", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974478126", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974478126, "node_id": "IC_kwDOBm6k_c46FVsu", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T21:16:36Z", "updated_at": "2021-11-19T21:16:36Z", "author_association": "OWNER", "body": "In the meantime I can catch these errors by changing the test to run each path twice, once with and once without the prefix. This should accurately simulate how Apache is working here.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974477465", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974477465, "node_id": "IC_kwDOBm6k_c46FViZ", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T21:15:30Z", "updated_at": "2021-11-19T21:15:30Z", "author_association": "OWNER", "body": "I think what's happening here is Apache is actually making a request to `/fixtures` rather than making a request to `/prefix/fixtures` - and Datasette is replying to requests on both the prefixed and the non-prefixed paths.\r\n\r\nThis is pretty confusing! I think Datasette should ONLY reply to `/prefix/fixtures` instead and return a 404 for `/fixtures` - this would make things a whole lot easier to debug.\r\n\r\nBut shipping that change could break existing deployments. Maybe that should be a breaking change for 1.0.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974450232", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974450232, "node_id": "IC_kwDOBm6k_c46FO44", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:41:53Z", "updated_at": "2021-11-19T20:42:19Z", "author_association": "OWNER", "body": "https://docs.datasette.io/en/stable/deploying.html#apache-proxy-configuration says I should use `ProxyPreserveHost on`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974447950", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974447950, "node_id": "IC_kwDOBm6k_c46FOVO", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:40:19Z", "updated_at": "2021-11-19T20:40:19Z", "author_association": "OWNER", "body": "Figured it out! The test is not an accurate recreation of what is happening, because it doesn't simulate a request with a path of `/fixtures` that has been redirected by the proxy to `/prefix/fixtures`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974433320", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974433320, "node_id": "IC_kwDOBm6k_c46FKwo", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:32:04Z", "updated_at": "2021-11-19T20:32:04Z", "author_association": "OWNER", "body": "Still not clear why the tests pass but the live example fails.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974433206", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974433206, "node_id": "IC_kwDOBm6k_c46FKu2", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:31:52Z", "updated_at": "2021-11-19T20:31:52Z", "author_association": "OWNER", "body": "Modified my `Dockerfile` to do this:\r\n\r\n RUN pip install https://github.com/simonw/datasette/archive/ff0dd4da38d48c2fa9250ecf336002c9ed724e36.zip\r\n\r\nAnd now the `request` in that debug `?_context=1` looks like this:\r\n```\r\n \"request\": \"\"\r\n```\r\nThat explains the bug - that request doesn't maintain the original path prefix of `http://localhost:5000/foo/bar/fixtures?sql=` (also it's been rewritten to `localhost:9000` instead of `localhost:5000`).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974422829", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974422829, "node_id": "IC_kwDOBm6k_c46FIMt", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:26:35Z", "updated_at": "2021-11-19T20:26:35Z", "author_association": "OWNER", "body": "In the `?_context=` debug view the request looks like this:\r\n```\r\n \"request\": \"\",\r\n```\r\nI'm going to add a `repr()` to it such that it's a bit more useful.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974420619", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974420619, "node_id": "IC_kwDOBm6k_c46FHqL", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:25:19Z", "updated_at": "2021-11-19T20:25:19Z", "author_association": "OWNER", "body": "The implementations of `path_with_removed_args` and `path_with_format`:\r\n\r\nhttps://github.com/simonw/datasette/blob/85849935292e500ab7a99f8fe0f9546e903baad3/datasette/utils/__init__.py#L228-L254\r\n\r\nhttps://github.com/simonw/datasette/blob/85849935292e500ab7a99f8fe0f9546e903baad3/datasette/utils/__init__.py#L710-L729", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974418496", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974418496, "node_id": "IC_kwDOBm6k_c46FHJA", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:24:16Z", "updated_at": "2021-11-19T20:24:16Z", "author_association": "OWNER", "body": "Here's the code that generates `edit_sql_url` correctly: https://github.com/simonw/datasette/blob/85849935292e500ab7a99f8fe0f9546e903baad3/datasette/views/database.py#L416-L420\r\n\r\nAnd here's the code for `show_hide_link`: https://github.com/simonw/datasette/blob/85849935292e500ab7a99f8fe0f9546e903baad3/datasette/views/database.py#L432-L433\r\n\r\nAnd for `url_csv`: https://github.com/simonw/datasette/blob/85849935292e500ab7a99f8fe0f9546e903baad3/datasette/views/base.py#L600-L602", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974398399", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974398399, "node_id": "IC_kwDOBm6k_c46FCO_", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:08:20Z", "updated_at": "2021-11-19T20:22:02Z", "author_association": "OWNER", "body": "The relevant test is this one: https://github.com/simonw/datasette/blob/30255055150d7bc0affc8156adc18295495020ff/tests/test_html.py#L1608-L1649\r\n\r\nI modified that test to add `\"/fixtures/facetable?sql=select+1\"` as one of the tested paths, and dropped in an `assert False` to pause it in the debugger:\r\n```\r\n @pytest.mark.parametrize(\r\n \"path\",\r\n [\r\n \"/\",\r\n \"/fixtures\",\r\n \"/fixtures/compound_three_primary_keys\",\r\n \"/fixtures/compound_three_primary_keys/a,a,a\",\r\n \"/fixtures/paginated_view\",\r\n \"/fixtures/facetable\",\r\n \"/fixtures?sql=select+1\",\r\n ],\r\n )\r\n def test_base_url_config(app_client_base_url_prefix, path):\r\n client = app_client_base_url_prefix\r\n response = client.get(\"/prefix/\" + path.lstrip(\"/\"))\r\n soup = Soup(response.body, \"html.parser\")\r\n if path == \"/fixtures?sql=select+1\":\r\n> assert False\r\nE assert False\r\n```\r\nBUT... in the debugger:\r\n```\r\n(Pdb) print(soup)\r\n...\r\n

This data as\r\n json,\r\n testall,\r\n testnone,\r\n testresponse,\r\n CSV

\r\n```\r\nThose all have the correct prefix! But that's not what I'm seeing in my `Dockerfile` reproduction of the issue.\r\n\r\nSomething very weird is going on here.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974405016", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974405016, "node_id": "IC_kwDOBm6k_c46FD2Y", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:14:19Z", "updated_at": "2021-11-19T20:15:05Z", "author_association": "OWNER", "body": "I added `template_debug` in the Dockerfile:\r\n```\r\ndatasette fixtures.db --setting template_debug 1 --setting base_url \"/foo/bar/\" -p 9000 &\\n\\\r\n```\r\nAnd then hit `http://localhost:5000/foo/bar/fixtures?sql=select+*+from+compound_three_primary_keys+limit+1&_context=1` to view the template context - and it showed the bug, output edited to just show relevant keys:\r\n\r\n```json\r\n{\r\n \"edit_sql_url\": \"/foo/bar/fixtures?sql=select+%2A+from+compound_three_primary_keys+limit+1\",\r\n \"settings\": {\r\n \"force_https_urls\": false,\r\n \"template_debug\": true,\r\n \"trace_debug\": false,\r\n \"base_url\": \"/foo/bar/\"\r\n },\r\n \"show_hide_link\": \"/fixtures?sql=select+%2A+from+compound_three_primary_keys+limit+1&_context=1&_hide_sql=1\",\r\n \"show_hide_text\": \"hide\",\r\n \"show_hide_hidden\": \"\",\r\n \"renderers\": {\r\n \"json\": \"/fixtures.json?sql=select+*+from+compound_three_primary_keys+limit+1&_context=1\"\r\n },\r\n \"url_csv\": \"/fixtures.csv?sql=select+*+from+compound_three_primary_keys+limit+1&_context=1&_size=max\",\r\n \"url_csv_path\": \"/fixtures.csv\",\r\n \"base_url\": \"/foo/bar/\"\r\n}\r\n```\r\nThis is so strange. `edit_sql_url` and `base_url` are correct, but `show_hide_link` and `url_csv` and `renderers.json` are not.\r\n\r\nAnd it's _really strange_ that the bug doesn't show up in the tests.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974391204", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974391204, "node_id": "IC_kwDOBm6k_c46FAek", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:02:41Z", "updated_at": "2021-11-19T20:02:41Z", "author_association": "OWNER", "body": "Bug confirmed:\r\n\r\n![proxy-bug](https://user-images.githubusercontent.com/9599/142684666-112136bf-9243-4b6e-8202-339fcfe91bcc.gif)\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974389472", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974389472, "node_id": "IC_kwDOBm6k_c46FADg", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T20:01:02Z", "updated_at": "2021-11-19T20:01:02Z", "author_association": "OWNER", "body": "I now have a `Dockerfile` in https://github.com/simonw/datasette/issues/1521#issuecomment-974388295 that I can use to run a local Apache 2 with `mod_proxy` to investigate this class of bugs!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974310208", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974310208, "node_id": "IC_kwDOBm6k_c46EstA", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T18:32:31Z", "updated_at": "2021-11-19T18:32:31Z", "author_association": "OWNER", "body": "Having a live demo running on Cloud Run that proxies through Apache and uses `base_url` would be incredibly useful for replicating and debugging this kind of thing. I wonder how hard it is to run Apache and `mod_proxy` in the same Docker container as Datasette?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1519#issuecomment-974309591", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1519", "id": 974309591, "node_id": "IC_kwDOBm6k_c46EsjX", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-19T18:31:32Z", "updated_at": "2021-11-19T18:31:32Z", "author_association": "OWNER", "body": "`base_url` has been a source of so many bugs like this! I often find them quite hard to replicate, likely because I haven't made myself a good Apache `mod_proxy` testing environment yet.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058790545, "label": "base_url is omitted in JSON and CSV views"}, "performed_via_github_app": null}