{
	"issue": {
		"url": "https://api.github.com/repos/laurent22/joplin/issues/7681",
		"repository_url": "https://api.github.com/repos/laurent22/joplin",
		"labels_url": "https://api.github.com/repos/laurent22/joplin/issues/7681/labels{/name}",
		"comments_url": "https://api.github.com/repos/laurent22/joplin/issues/7681/comments",
		"events_url": "https://api.github.com/repos/laurent22/joplin/issues/7681/events",
		"html_url": "https://github.com/laurent22/joplin/pull/7681",
		"id": 1560796201,
		"node_id": "PR_kwDOBLftOs5Iu0E3",
		"number": 7681,
		"title": "Server: Resolves #7580: Allowed APP_BASE_URL in CORS",
		"user": {
			"login": "carlosngo",
			"id": 36130773,
			"node_id": "MDQ6VXNlcjM2MTMwNzcz",
			"avatar_url": "https://avatars.githubusercontent.com/u/36130773?v=4",
			"gravatar_id": "",
			"url": "https://api.github.com/users/carlosngo",
			"html_url": "https://github.com/carlosngo",
			"followers_url": "https://api.github.com/users/carlosngo/followers",
			"following_url": "https://api.github.com/users/carlosngo/following{/other_user}",
			"gists_url": "https://api.github.com/users/carlosngo/gists{/gist_id}",
			"starred_url": "https://api.github.com/users/carlosngo/starred{/owner}{/repo}",
			"subscriptions_url": "https://api.github.com/users/carlosngo/subscriptions",
			"organizations_url": "https://api.github.com/users/carlosngo/orgs",
			"repos_url": "https://api.github.com/users/carlosngo/repos",
			"events_url": "https://api.github.com/users/carlosngo/events{/privacy}",
			"received_events_url": "https://api.github.com/users/carlosngo/received_events",
			"type": "User",
			"user_view_type": "public",
			"site_admin": false
		},
		"labels": [],
		"state": "closed",
		"locked": true,
		"assignee": null,
		"assignees": [],
		"milestone": null,
		"comments": 4,
		"created_at": "2023-01-28T09:54:41Z",
		"updated_at": "2023-01-28T12:24:18Z",
		"closed_at": "2023-01-28T12:24:01Z",
		"author_association": "CONTRIBUTOR",
		"sub_issues_summary": {
			"total": 0,
			"completed": 0,
			"percent_completed": 0
		},
		"active_lock_reason": null,
		"draft": false,
		"pull_request": {
			"url": "https://api.github.com/repos/laurent22/joplin/pulls/7681",
			"html_url": "https://github.com/laurent22/joplin/pull/7681",
			"diff_url": "https://github.com/laurent22/joplin/pull/7681.diff",
			"patch_url": "https://github.com/laurent22/joplin/pull/7681.patch",
			"merged_at": null
		},
		"body": "Resolves #7580 \r\n\r\n#### Current Behavior:\r\nIf request origin is not equal (or similar) to the following:\r\n- `https://joplinapp.org`\r\n- `http://localhost:8077` (if dev)\r\n- `USER_CONTENT_BASE_URL` environment variable\r\n\r\n`https://joplinapp.org` is returned as the Access-Control-Allow-Origin header by default.\r\n\r\n```\r\norigin: (ctx: AppContext) => {\r\n\tconst origin = ctx.request.header.origin;\r\n\r\n\tif (acceptOrigin(origin)) {\r\n\t\treturn origin;\r\n\t} else {\r\n\t\t// we can't return void, so let's return one of the valid domains\r\n\t\treturn corsAllowedDomains[0];\r\n\t}\r\n},\r\n```\r\n\r\nThis PR attempts to add the APP_BASE_URL environment variable to the allowed domains. ",
		"closed_by": {
			"login": "laurent22",
			"id": 1285584,
			"node_id": "MDQ6VXNlcjEyODU1ODQ=",
			"avatar_url": "https://avatars.githubusercontent.com/u/1285584?v=4",
			"gravatar_id": "",
			"url": "https://api.github.com/users/laurent22",
			"html_url": "https://github.com/laurent22",
			"followers_url": "https://api.github.com/users/laurent22/followers",
			"following_url": "https://api.github.com/users/laurent22/following{/other_user}",
			"gists_url": "https://api.github.com/users/laurent22/gists{/gist_id}",
			"starred_url": "https://api.github.com/users/laurent22/starred{/owner}{/repo}",
			"subscriptions_url": "https://api.github.com/users/laurent22/subscriptions",
			"organizations_url": "https://api.github.com/users/laurent22/orgs",
			"repos_url": "https://api.github.com/users/laurent22/repos",
			"events_url": "https://api.github.com/users/laurent22/events{/privacy}",
			"received_events_url": "https://api.github.com/users/laurent22/received_events",
			"type": "User",
			"user_view_type": "public",
			"site_admin": false
		},
		"reactions": {
			"url": "https://api.github.com/repos/laurent22/joplin/issues/7681/reactions",
			"total_count": 0,
			"+1": 0,
			"-1": 0,
			"laugh": 0,
			"hooray": 0,
			"confused": 0,
			"heart": 0,
			"rocket": 0,
			"eyes": 0
		},
		"timeline_url": "https://api.github.com/repos/laurent22/joplin/issues/7681/timeline",
		"performed_via_github_app": null,
		"state_reason": null
	},
	"comments": [
		{
			"url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1407362248",
			"html_url": "https://github.com/laurent22/joplin/pull/7681#issuecomment-1407362248",
			"issue_url": "https://api.github.com/repos/laurent22/joplin/issues/7681",
			"id": 1407362248,
			"node_id": "IC_kwDOBLftOs5T4qTI",
			"user": {
				"login": "github-actions[bot]",
				"id": 41898282,
				"node_id": "MDM6Qm90NDE4OTgyODI=",
				"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
				"gravatar_id": "",
				"url": "https://api.github.com/users/github-actions%5Bbot%5D",
				"html_url": "https://github.com/apps/github-actions",
				"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
				"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
				"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
				"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
				"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
				"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
				"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
				"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
				"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
				"type": "Bot",
				"user_view_type": "public",
				"site_admin": false
			},
			"created_at": "2023-01-28T09:54:58Z",
			"updated_at": "2023-01-28T10:07:29Z",
			"author_association": "CONTRIBUTOR",
			"body": "****CLA Assistant Lite bot**** All contributors have signed the CLA  ✍️ ✅",
			"reactions": {
				"url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1407362248/reactions",
				"total_count": 0,
				"+1": 0,
				"-1": 0,
				"laugh": 0,
				"hooray": 0,
				"confused": 0,
				"heart": 0,
				"rocket": 0,
				"eyes": 0
			},
			"performed_via_github_app": null
		},
		{
			"url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1407362726",
			"html_url": "https://github.com/laurent22/joplin/pull/7681#issuecomment-1407362726",
			"issue_url": "https://api.github.com/repos/laurent22/joplin/issues/7681",
			"id": 1407362726,
			"node_id": "IC_kwDOBLftOs5T4qam",
			"user": {
				"login": "carlosngo",
				"id": 36130773,
				"node_id": "MDQ6VXNlcjM2MTMwNzcz",
				"avatar_url": "https://avatars.githubusercontent.com/u/36130773?v=4",
				"gravatar_id": "",
				"url": "https://api.github.com/users/carlosngo",
				"html_url": "https://github.com/carlosngo",
				"followers_url": "https://api.github.com/users/carlosngo/followers",
				"following_url": "https://api.github.com/users/carlosngo/following{/other_user}",
				"gists_url": "https://api.github.com/users/carlosngo/gists{/gist_id}",
				"starred_url": "https://api.github.com/users/carlosngo/starred{/owner}{/repo}",
				"subscriptions_url": "https://api.github.com/users/carlosngo/subscriptions",
				"organizations_url": "https://api.github.com/users/carlosngo/orgs",
				"repos_url": "https://api.github.com/users/carlosngo/repos",
				"events_url": "https://api.github.com/users/carlosngo/events{/privacy}",
				"received_events_url": "https://api.github.com/users/carlosngo/received_events",
				"type": "User",
				"user_view_type": "public",
				"site_admin": false
			},
			"created_at": "2023-01-28T09:56:39Z",
			"updated_at": "2023-01-28T09:56:39Z",
			"author_association": "CONTRIBUTOR",
			"body": "Hi @laurent22, first time contributing to this repo; let me know if there's anything I can improve on 😄 ",
			"reactions": {
				"url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1407362726/reactions",
				"total_count": 0,
				"+1": 0,
				"-1": 0,
				"laugh": 0,
				"hooray": 0,
				"confused": 0,
				"heart": 0,
				"rocket": 0,
				"eyes": 0
			},
			"performed_via_github_app": null
		},
		{
			"url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1407364680",
			"html_url": "https://github.com/laurent22/joplin/pull/7681#issuecomment-1407364680",
			"issue_url": "https://api.github.com/repos/laurent22/joplin/issues/7681",
			"id": 1407364680,
			"node_id": "IC_kwDOBLftOs5T4q5I",
			"user": {
				"login": "carlosngo",
				"id": 36130773,
				"node_id": "MDQ6VXNlcjM2MTMwNzcz",
				"avatar_url": "https://avatars.githubusercontent.com/u/36130773?v=4",
				"gravatar_id": "",
				"url": "https://api.github.com/users/carlosngo",
				"html_url": "https://github.com/carlosngo",
				"followers_url": "https://api.github.com/users/carlosngo/followers",
				"following_url": "https://api.github.com/users/carlosngo/following{/other_user}",
				"gists_url": "https://api.github.com/users/carlosngo/gists{/gist_id}",
				"starred_url": "https://api.github.com/users/carlosngo/starred{/owner}{/repo}",
				"subscriptions_url": "https://api.github.com/users/carlosngo/subscriptions",
				"organizations_url": "https://api.github.com/users/carlosngo/orgs",
				"repos_url": "https://api.github.com/users/carlosngo/repos",
				"events_url": "https://api.github.com/users/carlosngo/events{/privacy}",
				"received_events_url": "https://api.github.com/users/carlosngo/received_events",
				"type": "User",
				"user_view_type": "public",
				"site_admin": false
			},
			"created_at": "2023-01-28T10:06:46Z",
			"updated_at": "2023-01-28T10:06:46Z",
			"author_association": "CONTRIBUTOR",
			"body": "I have read the CLA Document and I hereby sign the CLA",
			"reactions": {
				"url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1407364680/reactions",
				"total_count": 0,
				"+1": 0,
				"-1": 0,
				"laugh": 0,
				"hooray": 0,
				"confused": 0,
				"heart": 0,
				"rocket": 0,
				"eyes": 0
			},
			"performed_via_github_app": null
		},
		{
			"url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1407388236",
			"html_url": "https://github.com/laurent22/joplin/pull/7681#issuecomment-1407388236",
			"issue_url": "https://api.github.com/repos/laurent22/joplin/issues/7681",
			"id": 1407388236,
			"node_id": "IC_kwDOBLftOs5T4wpM",
			"user": {
				"login": "laurent22",
				"id": 1285584,
				"node_id": "MDQ6VXNlcjEyODU1ODQ=",
				"avatar_url": "https://avatars.githubusercontent.com/u/1285584?v=4",
				"gravatar_id": "",
				"url": "https://api.github.com/users/laurent22",
				"html_url": "https://github.com/laurent22",
				"followers_url": "https://api.github.com/users/laurent22/followers",
				"following_url": "https://api.github.com/users/laurent22/following{/other_user}",
				"gists_url": "https://api.github.com/users/laurent22/gists{/gist_id}",
				"starred_url": "https://api.github.com/users/laurent22/starred{/owner}{/repo}",
				"subscriptions_url": "https://api.github.com/users/laurent22/subscriptions",
				"organizations_url": "https://api.github.com/users/laurent22/orgs",
				"repos_url": "https://api.github.com/users/laurent22/repos",
				"events_url": "https://api.github.com/users/laurent22/events{/privacy}",
				"received_events_url": "https://api.github.com/users/laurent22/received_events",
				"type": "User",
				"user_view_type": "public",
				"site_admin": false
			},
			"created_at": "2023-01-28T12:24:01Z",
			"updated_at": "2023-01-28T12:24:01Z",
			"author_association": "OWNER",
			"body": "Sorry I can't evaluate the impact of this change and I don't want to break existing Joplin Server installations, let alone Joplin Cloud, so I'd rather not merge. The linked issue simply asks to remove joplinapp.org, and we may do that but that's very low priority",
			"reactions": {
				"url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1407388236/reactions",
				"total_count": 0,
				"+1": 0,
				"-1": 0,
				"laugh": 0,
				"hooray": 0,
				"confused": 0,
				"heart": 0,
				"rocket": 0,
				"eyes": 0
			},
			"performed_via_github_app": null
		}
	]
}