허용 목록 URL
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
허용 목록을 사용하여 스크립트나 부가기능에서 액세스하도록 사전 승인된 특정 URL을 지정합니다. 허용 목록은 사용자 데이터를 보호하는 데 도움이 됩니다. 허용 목록을 정의하면 스크립트 프로젝트가 허용 목록에 추가되지 않은 URL에 액세스할 수 없습니다.
이 필드는 테스트 배포를 설치할 때는 선택사항이지만 버전이 지정된 배포를 만들 때는 필수입니다.
스크립트 또는 부가기능이 다음 작업을 실행하는 경우 허용 목록을 사용합니다.
- Apps Script
UrlFetch
서비스를 사용하여 외부 위치 (예: HTTPS 엔드포인트)에서 정보를 가져오거나 가져옵니다. URL을 가져오기 위해 허용 목록에 추가하려면 매니페스트 파일에 urlFetchWhitelist
필드를 포함하세요.
- 사용자 작업에 대한 응답으로 URL을 열거나 표시합니다 (Google 외부 URL을 열거나 표시하는 Google Workspace 부가기능에 필요). 열 URL을 허용 목록에 추가하려면 매니페스트 파일에
addOns.common.openLinkUrlPrefixes
필드를 포함합니다.
허용 목록에 접두사 추가
매니페스트 파일에서 허용 목록을 지정할 때는 (addOns.common.openLinkUrlPrefixes
또는 urlFetchWhitelist
필드를 포함하여) URL 접두사 목록을 포함해야 합니다. 매니페스트에 추가하는 접두사는 다음 요구사항을 충족해야 합니다.
- 각 접두사는 유효한 URL이어야 합니다.
- 각 접두사는
http://
가 아닌 https://
를 사용해야 합니다.
- 각 접두사에는 전체 도메인이 있어야 합니다.
- 각 접두사에는 비어 있지 않은 경로가 있어야 합니다. 예를 들어
https://www.google.com/
는 유효하지만 https://www.google.com
는 유효하지 않습니다.
- 와일드 카드를 사용하여 URL 하위 도메인 접두사를 일치시킬 수 있습니다.
addOns.common.openLinkUrlPrefixes
필드에서 단일 *
와일드 카드를 사용하여 모든 링크를 일치시킬 수 있지만, 이는 사용자의 데이터를 위험에 노출시키고 부가기능 검토 프로세스를 연장할 수 있으므로 권장되지 않습니다. 애드온 기능에 필요한 경우에만 와일드 카드를 사용하세요.
URL이 허용 목록의 접두사와 일치하는지 확인할 때는 다음 규칙이 적용됩니다.
- 경로 일치는 대소문자를 구분합니다.
- 접두사가 URL과 동일하면 일치하는 것입니다.
- URL이 동일하거나 접두사의 하위 항목인 경우 일치합니다.
예를 들어 접두사 https://example.com/foo
는 다음 URL과 일치합니다.
https://example.com/foo
https://example.com/foo/
https://example.com/foo/bar
https://example.com/foo?bar
https://example.com/foo#bar
와일드 카드 사용
단일 와일드 카드 문자 (*
)를 사용하여 urlFetchWhitelist
및 addOns.common.openLinkUrlPrefixes
필드의 하위 도메인을 일치시킬 수 있습니다. 와일드 카드를 두 개 이상 사용하여 여러 하위 도메인을 일치시킬 수 없으며 와일드 카드는 URL의 선행 접두사를 나타내야 합니다.
예를 들어 https://*.example.com/foo
프리픽스는 다음 URL과 일치합니다.
https://subdomain.example.com/foo
https://any.number.of.subdomains.example.com/foo
https://*.example.com/foo
접두사가 다음 URL과 일치하지 않습니다.
https://subdomain.example.com/bar
(접미사 불일치)
https://example.com/foo
(하나 이상의 하위 도메인이 있어야 함)
매니페스트를 저장하려고 하면 일부 접두사 규칙이 적용됩니다. 예를 들어 저장하려고 할 때 매니페스트에 다음 접두사가 있으면 오류가 발생합니다.
https://*.*.example.com/foo
(와일드 카드는 여러 개 사용할 수 없음)
https://subdomain.*.example.com/foo
(와일드 카드는 선행 접두사로 사용해야 함)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eAllowlists specify approved URLs for your script or add-on to access, enhancing user data protection by restricting access to unlisted URLs.\u003c/p\u003e\n"],["\u003cp\u003eAllowlists are necessary for scripts that fetch external data or open external links, especially for versioned deployments and Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003eWhen defining allowlists, use HTTPS prefixes with full domains, non-empty paths, and optional wildcards for subdomains, ensuring adherence to specific formatting rules.\u003c/p\u003e\n"],["\u003cp\u003eAllowlist prefixes are matched against URLs based on case-sensitive path comparisons, allowing access to identical URLs or child paths of the prefix.\u003c/p\u003e\n"],["\u003cp\u003eWildcards can represent subdomains in allowlist prefixes but must be used as the leading prefix and cannot be used to match multiple subdomains simultaneously.\u003c/p\u003e\n"]]],[],null,["# Allowlist URLs\n\nYou use allowlists to designate specific URLs that are pre-approved for access\nby your script or add-on. Allowlists help protect user\ndata; when you define an allowlist, script projects can't access URLs that have\nnot been added to the allowlist.\n\nThis field is optional when you install a test deployment, but is required when\nyou create a versioned deployment.\n\nYou use allowlists when your script or add-on performs\nthe following actions:\n\n- Retrieves or fetches information from an external location (such as HTTPS endpoints) using the Apps Script [`UrlFetch`](/apps-script/reference/url-fetch) service. To allowlist URLs for fetching, include the [`urlFetchWhitelist`](/apps-script/manifest#Manifest.FIELDS.urlFetchWhitelist) field in your manifest file.\n- Opens or displays a URL in response to a user action (Required for Google Workspace add-ons that open or display URLs that are external to Google). To allowlist URLs for opening, include the [`addOns.common.openLinkUrlPrefixes`](/apps-script/manifest/addons#Common.FIELDS.openLinkUrlPrefixes) field in your manifest file.\n\n| **Note:** *Whitelist* , as used in [`urlFetchWhitelist`](/apps-script/manifest#Manifest.FIELDS.urlFetchWhitelist), is a deprecated term that is synonymous with and replaced by *allowlist* . For more information, see [Writing inclusive documentation](https://developers.google.com/style/inclusive-documentation).\n\n### Adding prefixes to your allowlist\n\nWhen you specify allowlists in your manifest file (by including either the\n`addOns.common.openLinkUrlPrefixes` or `urlFetchWhitelist` field), you must\ninclude a list of URL prefixes. The prefixes you add to the manifest must\nsatisfy the following requirements:\n\n- Each prefix must be a valid URL.\n- Each prefix must use `https://`, not `http://`.\n- Each prefix must have a full domain.\n- Each prefix must have a non-empty path. For example, `https://www.google.com/` is valid but `https://www.google.com` is not.\n- You can use [wildcards](#using_wildcards) to match URL subdomain prefixes.\n- A single `*` wildcard can be used in the [`addOns.common.openLinkUrlPrefixes`](/apps-script/manifest/addons#Common.FIELDS.openLinkUrlPrefixes) field to match all links, but this is not recommended as it can expose a user's data to risk and can prolong the [add-on review](/workspace/add-ons/concepts/gsuite-addon-review) process. Only use a wildcard if your add-on functionality requires it.\n\nWhen determining if a URL matches a prefix in the allowlist, the following rules\napply:\n\n- Path matching is case-sensitive.\n- If the prefix is identical to the URL, it is a match.\n- If the URL is the same or a child of the prefix, it is a match.\n\nFor example, the prefix `https://example.com/foo` matches the following URLs:\n\n- `https://example.com/foo`\n- `https://example.com/foo/`\n- `https://example.com/foo/bar`\n- `https://example.com/foo?bar`\n- `https://example.com/foo#bar`\n\n### Using wildcards\n\nYou can use a single wildcard character (`*`) to match a subdomain for both the\n[`urlFetchWhitelist`](/apps-script/manifest#Manifest.FIELDS.urlFetchWhitelist)\nand [`addOns.common.openLinkUrlPrefixes`](/apps-script/manifest/addons#Common.FIELDS.openLinkUrlPrefixes)\nfields. You can't use more than one wildcard to match multiple subdomains, and\nthe wildcard must represent the leading prefix of the URL.\n\nFor example, the prefix `https://*.example.com/foo` matches the following\nURLs:\n\n- `https://subdomain.example.com/foo`\n- `https://any.number.of.subdomains.example.com/foo`\n\nThe prefix `https://*.example.com/foo` *doesn't* match the following\nURLs:\n\n- `https://subdomain.example.com/bar` (suffix mismatch)\n- `https://example.com/foo` (at least one subdomain must be present)\n\nSome of the prefix rules are enforced when you try to save your manifest. For\nexample, the following prefixes cause an error if they are present in your\nmanifest when you attempt to save:\n\n- `https://*.*.example.com/foo` (multiple wildcards are forbidden)\n- `https://subdomain.*.example.com/foo` (wildcards must be used as a leading prefix)"]]