{"html_url": "https://github.com/simonw/datasette/issues/1025#issuecomment-712593790", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1025", "id": 712593790, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU5Mzc5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T05:12:36Z", "updated_at": "2020-10-20T05:12:36Z", "author_association": "OWNER", "body": "I'm going to leave the cookies code setting cookies to default to the `\"/\"` top level.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722724086, "label": "Fix last remaining links to \"/\" that do not respect base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1025#issuecomment-712579674", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1025", "id": 712579674, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU3OTY3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T04:24:10Z", "updated_at": "2020-10-20T04:24:10Z", "author_association": "OWNER", "body": "Changed my mind, `error.html` needs access to `urls` in order to link to its CSS file. Passing it after all (it already got passed `ds.config(\"base_url\")` so `ds` was available previously).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722724086, "label": "Fix last remaining links to \"/\" that do not respect base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1025#issuecomment-712481127", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1025", "id": 712481127, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjQ4MTEyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-19T22:40:37Z", "updated_at": "2020-10-20T01:21:36Z", "author_association": "OWNER", "body": "Was blocked on #904 - now unblocked.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722724086, "label": "Fix last remaining links to \"/\" that do not respect base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1025#issuecomment-712525557", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1025", "id": 712525557, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjUyNTU1Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T01:07:02Z", "updated_at": "2020-10-20T01:07:02Z", "author_association": "OWNER", "body": "I fixed the `queries.html` one. I'm not going to fix these two:\r\n```\r\ndatasette/templates/error.html: home\r\ndatasette/templates/patterns.html: home /\r\n```\r\nBecause the `error.html` one does not get passed a context (which makes sense since an error has occurred) and the pattern portfolio doesn't need to link to anywhere in particular.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722724086, "label": "Fix last remaining links to \"/\" that do not respect base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1025#issuecomment-709632314", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1025", "id": 709632314, "node_id": "MDEyOklzc3VlQ29tbWVudDcwOTYzMjMxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-15T22:56:25Z", "updated_at": "2020-10-15T22:56:34Z", "author_association": "OWNER", "body": "That `utils/asgi.py` line is the default path for setting cookies. That should likely take `base_url` into account too:\r\nhttps://github.com/simonw/datasette/blob/4f7c0ebd85ccd8c1853d7aa0147628f7c1b749cc/datasette/utils/asgi.py#L331-L342", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722724086, "label": "Fix last remaining links to \"/\" that do not respect base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1025#issuecomment-709632136", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1025", "id": 709632136, "node_id": "MDEyOklzc3VlQ29tbWVudDcwOTYzMjEzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-15T22:55:44Z", "updated_at": "2020-10-15T22:55:44Z", "author_association": "OWNER", "body": "It looks like there are also some generated redirect responses that don't take `base_url` into account:\r\n```\r\ndatasette % git grep '\"/' -- '*.py' ':(exclude)*test_*.py' ':(exclude)datasette/app.py'\r\ndatasette/_version.py: for i in cfg.versionfile_source.split(\"/\"):\r\ndatasette/utils/asgi.py: path=\"/\",\r\ndatasette/views/base.py: should_redirect = \"/{}-{}\".format(name, expected)\r\ndatasette/views/base.py: should_redirect += \"/\" + urllib.parse.quote_plus(kwargs[\"table\"])\r\ndatasette/views/base.py: should_redirect += \"/\" + kwargs[\"pk_path\"]\r\ndatasette/views/special.py: response = Response.redirect(\"/\")\r\ndatasette/views/special.py: return Response.redirect(\"/\")\r\ndatasette/views/special.py: response = Response.redirect(\"/\")\r\ndatasette/views/special.py: return Response.redirect(\"/\")\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722724086, "label": "Fix last remaining links to \"/\" that do not respect base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1025#issuecomment-709629920", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1025", "id": 709629920, "node_id": "MDEyOklzc3VlQ29tbWVudDcwOTYyOTkyMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-15T22:48:20Z", "updated_at": "2020-10-15T22:48:20Z", "author_association": "OWNER", "body": "Also these:\r\n```\r\ndatasette % git grep '\"/' -- '*.html' ':(exclude)*/patterns.html'\r\ndatasette/templates/allow_debug.html:
\r\ndatasette/templates/base.html: \r\ndatasette/templates/error.html: home\r\ndatasette/templates/logout.html:\r\ndatasette/templates/messages_debug.html:\r\ndatasette/templates/query.html: home /\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722724086, "label": "Fix last remaining links to \"/\" that do not respect base_url"}, "performed_via_github_app": null}