{"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/40#issuecomment-643393506", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/40", "id": 643393506, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzM5MzUwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T17:21:14Z", "updated_at": "2020-06-12T17:21:14Z", "author_association": "MEMBER", "body": "I only install SQLite for this:\r\n\r\nhttps://github.com/dogsheep/github-to-sqlite/blob/c0d54e0260468be38152293df5abd775c068495d/.github/workflows/deploy-demo.yml#L77-L78\r\n\r\nI'm going to remove the need to install sqlite3 by making this possible with sqlite-utils: https://github.com/simonw/sqlite-utils/issues/115", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637899539, "label": "Demo deploy is broken"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/40#issuecomment-643414646", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/40", "id": 643414646, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzQxNDY0Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T18:06:48Z", "updated_at": "2020-06-12T18:06:48Z", "author_association": "MEMBER", "body": "That fixed it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637899539, "label": "Demo deploy is broken"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/805#issuecomment-643501428", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/805", "id": 643501428, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzUwMTQyOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T22:06:08Z", "updated_at": "2020-06-12T22:06:08Z", "author_association": "OWNER", "body": "This needs the `startup` hook, see https://github.com/simonw/datasette/issues/834#issuecomment-643501064", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 632724154, "label": "Writable canned queries live demo on Glitch"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/806#issuecomment-642998097", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/806", "id": 642998097, "node_id": "MDEyOklzc3VlQ29tbWVudDY0Mjk5ODA5Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T00:26:00Z", "updated_at": "2020-06-12T00:26:00Z", "author_association": "OWNER", "body": "OK, I'm ready to ship. Last check of the release notes, then I'll update the news section in the README and release 0.44!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 632753851, "label": "Release Datasette 0.44"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/806#issuecomment-643000948", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/806", "id": 643000948, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzAwMDk0OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T00:34:21Z", "updated_at": "2020-06-12T00:34:21Z", "author_association": "OWNER", "body": "I'm going to add https://github.com/simonw/datasette-auth-tokens and https://github.com/simonw/datasette-permissions-sql to the documentation and release notes in a few places.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 632753851, "label": "Release Datasette 0.44"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/806#issuecomment-643010591", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/806", "id": 643010591, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzAxMDU5MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T01:13:06Z", "updated_at": "2020-06-12T01:13:06Z", "author_association": "OWNER", "body": "Tests are passing again: https://github.com/simonw/datasette/commit/9ae0d483ead93c0832142e5dc85959ae3c8f73ea", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 632753851, "label": "Release Datasette 0.44"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/824#issuecomment-642991513", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/824", "id": 642991513, "node_id": "MDEyOklzc3VlQ29tbWVudDY0Mjk5MTUxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T00:11:50Z", "updated_at": "2020-06-12T00:11:50Z", "author_association": "OWNER", "body": "Done: https://github.com/simonw/datasette-auth-tokens and https://pypi.org/project/datasette-auth-tokens/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 635108074, "label": "Example authentication plugin"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/834#issuecomment-643501064", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/834", "id": 643501064, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzUwMTA2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T22:04:43Z", "updated_at": "2020-06-12T22:04:43Z", "author_association": "OWNER", "body": "Another use-case for this: I want to use the `--root` option on Glitch but it gives me a 127.0.0.1 URL. Glitch has a `PROJECT_DOMAIN` environment variable which tells me the URL. A `datasette-glitch` plugin could use a `startup` hook to output the correct login URL.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637342551, "label": "startup() plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/834#issuecomment-643509358", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/834", "id": 643509358, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzUwOTM1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T22:36:37Z", "updated_at": "2020-06-12T22:36:37Z", "author_association": "OWNER", "body": "This should be able to optionally return an async function which is then awaited.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637342551, "label": "startup() plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/834#issuecomment-643510240", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/834", "id": 643510240, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzUxMDI0MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T22:40:26Z", "updated_at": "2020-06-12T22:40:26Z", "author_association": "OWNER", "body": "Another use-case: plugins that need their own database with the correct tables. They can write to the database on startup to create their tables.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637342551, "label": "startup() plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/838#issuecomment-642993277", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/838", "id": 642993277, "node_id": "MDEyOklzc3VlQ29tbWVudDY0Mjk5MzI3Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T00:18:26Z", "updated_at": "2020-06-12T00:18:50Z", "author_association": "OWNER", "body": "Have you tried this without the `ProxyPassReverse` directive? I'm worried that might be confusing Datasette.\r\n\r\nThis is the test I used to ensure this feature works - it scrapes all of the links on a bunch of different pages. Could it be missing something here?\r\n\r\nhttps://github.com/simonw/datasette/blob/647c5ff0f3e8140f40d7f41f0874ce4e1f4df65c/tests/test_html.py#L1233-L1274\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637395097, "label": "Incorrect URLs when served behind a proxy with base_url set"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/838#issuecomment-643083451", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/838", "id": 643083451, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzA4MzQ1MQ==", "user": {"value": 79913, "label": "tsibley"}, "created_at": "2020-06-12T06:04:14Z", "updated_at": "2020-06-12T06:04:14Z", "author_association": "NONE", "body": "Hmm, I haven't tried removing `ProxyPassReverse`, but it doesn't touch the HTML, which is the issue I'm seeing. You can read the [documentation here](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypassreverse). `ProxyPassReverse` is a standard directive when proxying with Apache. I've used it dozens of times with other applications.\r\n\r\nLooking a little more at the code, I think the issue here is that the behaviour of `base_url` makes sense when Datasette is _mounted_ at a path within a larger application, but not when HTTP requests are being _proxied_ to it.\r\n\r\nIn a _mount_ situation, it is perfectly fine to construct URLs reusing the domain and path from the request. In a _proxy_ situation, it never is, as the domain and path in the request are not the domain and path that the non-proxy client actually needs to use. That is, links which include the Apache \u2192 Datasette request origin, `localhost:8001`, instead of the browser \u2192 Apache request origin, `example.com`, will be broken.\r\n\r\nThe tests you pointed to also reflect this in two ways:\r\n\r\n1. They strip a leading `http://localhost`, allowing such URLs in the facet links to pass, but inclusion of that in a proxy situation would mean the URL is broken.\r\n\r\n2. The test client emits direct ASGI events instead of actual proxied HTTP requests. The headers of these ASGI events don't reflect the way an HTTP proxy works; instead they pass through the original request path which contains `base_url`. This works because Datasette responds to requests equivalently at either `/\u2026` or `/{base_url}/\u2026`, which makes some sense in a _mount_ situation but is unconventional (albeit workable) for a proxied app.\r\n\r\nApps that support being proxied automatically support being mounted, but apps that only support being mounted don't automatically support being proxied.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637395097, "label": "Incorrect URLs when served behind a proxy with base_url set"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/840#issuecomment-643453128", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/840", "id": 643453128, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzQ1MzEyOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T19:43:15Z", "updated_at": "2020-06-12T19:43:15Z", "author_association": "OWNER", "body": "I don't like how this often involves a logout link that can be maliciously activated.\r\n\r\nI'm going to use a CSRF protected form button styled to look like a link instead.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637966833, "label": "Log out mechanism for clearing ds_actor cookie"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/840#issuecomment-643454625", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/840", "id": 643454625, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzQ1NDYyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T19:47:38Z", "updated_at": "2020-06-12T19:47:53Z", "author_association": "OWNER", "body": "Another problem: what to display in the \"you are logged in as\", since we don't dictate an actor design.\r\n\r\nI'm going to use a includes template for this that can easily be over-ridden by administrators or by plugins.\r\n\r\nThe default will look for the first available of the following keys:\r\n\r\n- display\r\n- name\r\n- username\r\n- login\r\n- id", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637966833, "label": "Log out mechanism for clearing ds_actor cookie"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/115#issuecomment-643406939", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/115", "id": 643406939, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MzQwNjkzOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-12T17:51:11Z", "updated_at": "2020-06-12T17:51:11Z", "author_association": "OWNER", "body": "https://github.com/simonw/sqlite-utils/blob/03ee97d2258254581bea72842518904fc1cbe60f/tests/test_cli.py#L1112-L1128", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637889964, "label": "Ability to execute insert/update statements with the CLI"}, "performed_via_github_app": null}