מתן הרשאה לדפוסי כתובות URL ספציפיים
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
כדי למנוע מצדדים לא מורשים להשתמש במפתח ה-API שלכם כדי ליצור Dynamic Links שמפנה מהדומיין שלכם לאתרים שלא בבעלותכם, אתם צריכים לציין את כתובות ה-URL שאליהן Dynamic Links יכול להפנות.
כדי לציין את כתובות ה-URL המותרות, לוחצים על more_vert > תבנית כתובת URL של רשימת ההיתרים בדף Dynamic Links במסוף Firebase, ואז מציינים עד 10 ביטויים רגולריים באמצעות תחביר RE2. אפשר להשתמש בהצלחה רק בכתובות URL שתואמות לאחד מהביטויים הרגולריים האלה כקישור עמוק (link
) או כקישור חלופי (afl
, ifl
, ipfl
, ofl
) עבור Dynamic Links. אם מציינים תבניות של כתובות URL, כל כתובת URL שלא תואמת לאחת מהתבניות תגרום ל-Dynamic Links להחזיר שגיאת HTTP 400.
כדאי להגביל ככל האפשר את תבניות כתובות ה-URL. לדוגמה:
מתירני מדי |
טוב יותר |
^https://.*.com/.*$
יכולה להפנות לכל דף בכל אתר שמסתיים ב-.com .
|
^https://mybrand\.com/.*$
אפשר להפנות רק לדפים בכתובת mybrand.com .
|
^https://play.google.com/.*$
יכול להפנות לדף של כל אפליקציה ב-Google Play Store.
|
^https://play\.google\.com/.*id=myapp\.com$
אפשר להפנות רק לדפים בכתובת Google Play Store עבור האפליקציה עם שם החבילה myapp.com .
|
^https://itunes.apple.com/.*$
יכול להפנות לכל דף ב-itunes.apple.com .
|
^https://itunes\.apple\.com/.*id123$
אפשר להפנות רק לדף האפליקציה ב-App Store עם המזהה
id123 .
|
כדי לוודא שקישור עומק וקישורי גיבוי ל-Dynamic Links תואמים לאחת מתבניות כתובות ה-URL שלכם, אפשר לעיין בדף הניפוי באגים של Dynamic Links ולוודא שאין אזהרות:
https://example.page.link/WXYZ?d=1
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["\u003cbr /\u003e\n\n| **Deprecated:** Firebase Dynamic Links is *deprecated* and should not be adopted in projects that don't already use it. The service will shut down on August 25, 2025. See the [Dynamic Links Deprecation FAQ](/support/dynamic-links-faq) for more information.\n\nTo prevent unauthorized parties from using your API key to create Dynamic Links that\nredirect from your domain to sites you don't own, you should specify the URLs\nyour Dynamic Links can redirect to.\n\nTo specify the allowed URLs, click\nmore_vert **\\\u003e Allowlist URL pattern**\nfrom the Dynamic Links page of the Firebase console, and then specify up to\n10 regular expressions using\n[RE2 syntax](https://github.com/google/re2/wiki/Syntax). Only URLs\nthat match one of these regular expressions can be successfully used as a deep\nlink (`link`) or fallback link (`afl`, `ifl`, `ipfl`, `ofl`) for a Dynamic Links. If\nyou specify URL patterns, any URL that doesn't match one of the patterns will\ncause your Dynamic Links to return HTTP error 400.\n\nYou should make your URL patterns as restrictive as possible. For example:\n\n| Too permissive | Better |\n|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| `^https://.*.com/.*$` Can redirect to any page on any site ending with `.com`. | `^https://mybrand\\.com/.*$` Can redirect only to pages at `mybrand.com`. |\n| `^https://play.google.com/.*$` Can redirect to any app's Google Play Store page. | `^https://play\\.google\\.com/.*id=myapp\\.com$` Can redirect only to Google Play Store pages for the app with the package name `myapp.com`. |\n| `^https://itunes.apple.com/.*$` Can redirect to any page on `itunes.apple.com`. | `^https://itunes\\.apple\\.com/.*id123$` Can redirect only to the App Store page for the app with the ID `id123`. |\n\nYou can make sure a deep link and fallback links for a Dynamic Links match one of\nyour URL patterns by viewing the debug page for Dynamic Links and verifying there are\nno warnings: \n\n```\nhttps://example.page.link/WXYZ?d=1\n```"]]