Skip to content

Commit 4a4f519

Browse files
WIP trying to hook up parts - CORS broken
1 parent dde1fd9 commit 4a4f519

6 files changed

Lines changed: 33 additions & 12 deletions

File tree

Func/Program.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
{
99
services.AddApplicationInsightsTelemetryWorkerService();
1010
services.ConfigureFunctionsApplicationInsights();
11+
12+
services.AddCors(options =>
13+
{
14+
options.AddPolicy("AllowWeb", builder =>
15+
{
16+
builder.WithOrigins("http://localhost:5173")
17+
.AllowAnyMethod()
18+
.AllowAnyHeader();
19+
});
20+
});
1121
})
1222
.Build();
1323

Func/host.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,16 @@
88
},
99
"enableLiveMetricsFilters": true
1010
}
11+
},
12+
"extensions": {
13+
"http": {
14+
"routePrefix": "api"
15+
}
16+
},
17+
"cors": {
18+
"allowedOrigins": [
19+
"http://localhost:5173"
20+
],
21+
"supportCredentials": false
1122
}
1223
}

web/.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
VITE_PORT=44463
1+
VITE_PORT=5173
22
VITE_DEFAULT_APISOURCE=LocalFunc
33

web/.vite/deps/_metadata.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"hash": "fb26cccf",
3+
"configHash": "08c72096",
4+
"lockfileHash": "f41aed01",
5+
"browserHash": "49f9f6e6",
6+
"optimized": {},
7+
"chunks": {}
8+
}

web/.vite/deps/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

web/CHANGELOG.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)