アセットのデプロイ
次のアセットまたは設定が、AEM Forms パブリッシュサーバーにデプロイされました。
-
OSGi configMgr を使用して、Apache Sling Service User Mapper Service に次のエントリを追加します。
DevelopingWithServiceUser.core:getformsresourceresolver=fd-service
サンプル React アプリをデプロイ
- サンプル React アプリをダウンロードします
- React アプリのコンテンツを新しいフォルダーに解凍します
- フォルダーに移動し、次のコマンドを実行します
npm install
npm start
EmergencyContact.js ファイルを開き、環境に合わせて fetch メソッド内の URL を変更します。
const getWebForm=async()=>
{
setSpinner(true)
console.log("inside widgetURL function emergency contact");
// NOTE: replace the `aemforms.azure.com:4503` with your AEM FORM server
let res = await fetch("http://aemforms.azure.com:4503/bin/getwidgeturl",
{
method: "POST",
body: JSON.stringify({"icTemplate":"/content/forms/af/waiver/waiver/channels/print","waiver":formData})
})
React アプリから AEM エンドポイントへの POST 呼び出しを有効にするには、Adobe Granite クロスオリジンリソース共有ポリシー設定の「許可されたオリジン」フィールドで適切なエントリを指定する必要があります。
CORS 設定オプションについて詳しくは、AEM での CORS についてを参照してください。
recommendation-more-help
8de24117-1378-413c-a581-01e660b7163e