Skip to content

Commit e40b34e

Browse files
committed
Update static web app configuration: add CORS headers to version.json and remove global headers from preview and production configs
1 parent 014be63 commit e40b34e

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

docs/static/staticwebapp.config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
"responseOverrides": {
55
"404": {
66
"rewrite": "/404"
7+
},
8+
"/version.json": {
9+
"headers": {
10+
"Access-Control-Allow-Origin": "*",
11+
"Access-Control-Allow-Methods": "GET, OPTIONS",
12+
"Access-Control-Allow-Headers": "Content-Type"
13+
}
714
}
815
}
916
}
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
{
2-
"globalHeaders": {
3-
"Access-Control-Allow-Origin": "https://devopsmigration.io",
4-
"Access-Control-Allow-Methods": "GET, OPTIONS",
5-
"Access-Control-Allow-Headers": "Content-Type",
6-
"Vary": "Origin"
7-
}
8-
}
1+
{}
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
{
2-
"globalHeaders": {
3-
"Access-Control-Allow-Origin": "https://blue-river-093197403-preview.westeurope.5.azurestaticapps.net",
4-
"Access-Control-Allow-Methods": "GET, OPTIONS",
5-
"Access-Control-Allow-Headers": "Content-Type",
6-
"Vary": "Origin"
7-
}
82
}

0 commit comments

Comments
 (0)