Skip to content

Commit ed54484

Browse files
Update continuous-integration-workflow.yml
1 parent 649e40c commit ed54484

File tree

1 file changed

+0
-48
lines changed

1 file changed

+0
-48
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -9,54 +9,6 @@ jobs:
99
runs-on: windows-latest
1010
steps:
1111
- uses: actions/checkout@v3
12-
13-
- name: Modify web.config
14-
shell: pwsh
15-
run: |
16-
$config = Get-ChildItem -Path "$(Build.SourcesDirectory)" -Recurse -Filter web.config
17-
18-
if (-not $config.configuration.'system.webServer') {
19-
$systemWebServer = $config.CreateElement("system.webServer")
20-
$config.configuration.AppendChild($systemWebServer) | Out-Null
21-
} else {
22-
$systemWebServer = $config.configuration.'system.webServer'
23-
}
24-
25-
if (-not $systemWebServer.httpProtocol) {
26-
$httpProtocol = $config.CreateElement("httpProtocol")
27-
$systemWebServer.AppendChild($httpProtocol) | Out-Null
28-
} else {
29-
$httpProtocol = $systemWebServer.httpProtocol
30-
}
31-
32-
if (-not $httpProtocol.customHeaders) {
33-
$customHeaders = $config.CreateElement("customHeaders")
34-
$httpProtocol.AppendChild($customHeaders) | Out-Null
35-
} else {
36-
$customHeaders = $httpProtocol.customHeaders
37-
}
38-
39-
foreach ($name in @("X-Powered-By", "Server")) {
40-
$removeNode = $config.CreateElement("remove")
41-
$removeNode.SetAttribute("name", $name)
42-
$customHeaders.AppendChild($removeNode) | Out-Null
43-
}
44-
45-
if (-not $systemWebServer.security) {
46-
$security = $config.CreateElement("security")
47-
$systemWebServer.AppendChild($security) | Out-Null
48-
} else {
49-
$security = $systemWebServer.security
50-
}
51-
52-
if (-not $security.requestFiltering) {
53-
$requestFiltering = $config.CreateElement("requestFiltering")
54-
$requestFiltering.SetAttribute("removeServerHeader", "true")
55-
$security.AppendChild($requestFiltering) | Out-Null
56-
}
57-
58-
$config.Save("${{ github.workspace }}/LearningHub.Nhs.WebUI/web.config")
59-
6012
- name: Setup .NET Core SDK 6.0
6113
uses: actions/setup-dotnet@v3
6214
with:

0 commit comments

Comments
 (0)