Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Xdt for sitecore web.config #60

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions src/platform/App_Data/Xdts/Web.config.xdt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="
http://schemas.microsoft.com/XML-Document-Transform">

<location path="sitecore">
<system.webServer>
<httpProtocol>
<customHeaders>
<!--DO NOT USE THIS CONTENT SECURITY POLICY EXAMPLE IN YOUR SOLUTION-->
<add name="Content-Security-Policy" value="default-src 'self' 'unsafe-inline' 'unsafe-eval'
https://apps.sitecore.net;
img-src 'self' data:
https://espirechdemo.sitecoresandbox.cloud/
https://s.gravatar.com
https://*.wp.com/cdn.auth0.com/avatars;
style-src 'self' 'unsafe-inline'
https://fonts.googleapis.com;
font-src 'self' 'unsafe-inline'
https://fonts.gstatic.com;
block-all-mixed-content; child-src 'self'
https://espirechdemo.sitecoresandbox.cloud/;
connect-src 'self'
https://espirechdemo.sitecoresandbox.cloud/;
media-src
https://espirechdemo.sitecoresandbox.cloud/"
xdt:Transform="Replace" xdt:Locator="Match(name)"/>
</customHeaders>
</httpProtocol>
</system.webServer>
</location>
</configuration>
1 change: 1 addition & 0 deletions src/platform/Platform.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<PackageReference Include="Sitecore.Assemblies.SitecoreHeadlessServicesServer" />
</ItemGroup>
<ItemGroup>
<Content Include="App_Data\Xdts\Web.config.xdt" />
<None Include="Platform.wpp.targets" />
<None Include="Properties\PublishProfiles\Local.pubxml" />
<None Include="README.md" />
Expand Down
62 changes: 34 additions & 28 deletions xmcloud.build.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
{
"renderingHosts": {
"xmcloudpreview": {
"path": "./src/sxastarter",
"nodeVersion": "16.15.1",
"jssDeploymentSecret": "xwf748xgtgko88jj7ls7pp6q2rr2bem6fmvmlipjcg",
"enabled": true,
"type": "sxa",
"lintCommand": "lint",
"startCommand": "start:production",
"buildCommand": "build",
"runCommand": "next:start"
"renderingHosts": {
"xmcloudpreview": {
"path": "./src/sxastarter",
"nodeVersion": "16.15.1",
"jssDeploymentSecret": "xwf748xgtgko88jj7ls7pp6q2rr2bem6fmvmlipjcg",
"enabled": true,
"type": "sxa",
"lintCommand": "lint",
"startCommand": "start:production",
"buildCommand": "build",
"runCommand": "next:start"
}
},
"transforms": [
{
"xdtPath": "/app_data/xdts/web.config.xdt",
"targetPath": "/web.config"
}
],
"postActions": {
"actions": {
"warmUpCm": {
"urls": [
"/sitecore/shell",
"/sitecore/shell/Applications/Content%20Editor.aspx?sc_bw=1",
"/sitecore/client/Applications/Launchpad"
]
},
"populateSchema": {
"indexNames": []
},
"reindex": {
"indexNames": []
}
},
"postActions": {
"actions":{
"warmUpCm": {
"urls": [
"/sitecore/shell",
"/sitecore/shell/Applications/Content%20Editor.aspx?sc_bw=1",
"/sitecore/client/Applications/Launchpad"
]
},
"populateSchema": {
"indexNames": []
},
"reindex": {
"indexNames": []
}
}
}
}
}