AEM畫面的Dispatcher Configurations

Dispatcher 是 Adobe Experience manager 的快取和/或負載平衡工具。

以下頁面提供為AEM Screens專案設定分派程式的准則。

注意

如果調度程式可用,則可以通過在調度程式規則中進行過濾來阻止與註冊servlet的連接。

如果沒有調度程式,請禁用OSGi元件清單中的註冊servlet。

先決條件

在您為AEM Screens專案設定分派程式之前,您必須具備Dispatcher的先前知識。

有關詳細資訊,請參閱配置Dispatcher

設定 Dispatcher

請依照下列步驟,為AEM Screens專案設定分派程式。

啟用粘滯會話

如果要將多個發佈實例與調度程式一起使用,則必須更新dispatcher.any檔案。

/stickyConnections {
  /paths
  {
    "/content/screens"
    "/home/users/screens"
    "/libs/granite/csrf/token.json"
  }
}

步驟1:配置客戶端標題

將下列內容新增至/clientheaders區段:

X-Requested-With

X-SET-HEARTBEAT

X-REQUEST-COMMAND

步驟2:配置螢幕過濾器

若要設定「畫面」篩選,請將下列項目新增至​/filter

## AEM Screens Filters
## # Login, Ping and Device Configurations
/0200 { /type "allow" /method "POST" /url "/libs/granite/core/content/login.validate/j_security_check" }
/0201 { /type "allow" /method "GET" /url "/libs/granite/csrf/token.json" }
/0202 { /type "allow" /method "GET" /url "/content/screens/svc.json" }
/0203 { /type "allow" /method "GET" /url "/content/screens/svc.ping.json" }
/0204 { /type "allow" /method "GET" /url "/content/screens/svc.config.json" }
## # Device Dashboard Configurations
/0210 { /type "allow" /method '(GET|POST)' /url "/home/users/screens/*/devices/*/profile_screens.preferences.json" }
/0211 { /type "allow" /method "POST" /url "/home/users/screens/*/devices/*/profile_screens.logs.json" }
/0212 { /type "allow" /method "POST" /url "/home/users/screens/*/devices/*/profile_screens.statusinfo.json" }
/0213 { /type "allow" /method "POST" /url "/home/users/screens/*/devices/*/profile_screens.screenshot.json" }
## # Content Configurations
/0220 { /type "allow" /method '(GET|HEAD)' /url "/content/screens/*" }
/0221 { /type "allow" /method '(GET|HEAD)' /url "/content/screens/*/jcr:content/*/offline-config_*.zip" }
/0222 { /type "allow" /method '(GET|HEAD)' /url '/var/contentsync/content/screens/.+/jcr:content/.+/offline-config_.*\.[0-9]+\.zip' }

步驟3:禁用Dispatcher快取

停用​/content/screens path​的Dispatcher caching。

畫面播放器使用已驗證的作業,因此分派器不會快取任何畫面播放器對channels/assets的要求。

若要啟用資產的快取,以便從分派器快取中提供資產,您必須:

  • /cache節中添加/allowAuthorization 1
  • 將下列規則新增至/cache/rules區段
/0000
    {
        /glob "*"
        /type "allow"
    }   

/0001
    {
        # Disable Dispatcher Cache for Screens channels
        /glob "/content/screens/*.html"
        /type "deny" 
    }

/0002
    {
    # Disable Dispatcher Cache for Screens offline manifests
    /glob "/content/screens/*.json"
    /type "deny"
    }

/0003
    { # Disable Dispatcher Cache for Screens devices json 
    /glob "/home/users/screens/*.json"
    /type "deny"
    }

本頁內容