Skip to content

Commit 7eb0cba

Browse files
committed
fix: electron cors broke again
1 parent 4e67bf6 commit 7eb0cba

7 files changed

Lines changed: 49 additions & 9 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ default.db-wal
1818
node_modules/
1919
dockerbp.sh
2020

21-
.DS_Store
21+
.DS_Store
22+
23+
# App dist secrets
24+
google-services.json

android/.idea/deploymentTargetSelector.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
2.99 KB
Binary file not shown.
2.93 KB
Binary file not shown.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"version": 3,
3+
"artifactType": {
4+
"type": "APK",
5+
"kind": "Directory"
6+
},
7+
"applicationId": "org.ftcvanguard.vanguard",
8+
"variantName": "release",
9+
"elements": [
10+
{
11+
"type": "SINGLE",
12+
"filters": [],
13+
"attributes": [],
14+
"versionCode": 1,
15+
"versionName": "1.0",
16+
"outputFile": "app-release.apk"
17+
}
18+
],
19+
"elementType": "File",
20+
"baselineProfiles": [
21+
{
22+
"minApi": 28,
23+
"maxApi": 30,
24+
"baselineProfiles": [
25+
"baselineProfiles/1/app-release.dm"
26+
]
27+
},
28+
{
29+
"minApi": 31,
30+
"maxApi": 2147483647,
31+
"baselineProfiles": [
32+
"baselineProfiles/0/app-release.dm"
33+
]
34+
}
35+
],
36+
"minSdkVersionForDexing": 24
37+
}

electron/src/setup.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,6 @@ export function setupContentSecurityPolicy(customScheme: string): void {
263263
"Content-Security-Policy": [cspDirectives],
264264
};
265265

266-
if (details.url.startsWith("https://ftcvanguard.org/api/")) {
267-
responseHeaders["Access-Control-Allow-Origin"] = ["*"];
268-
responseHeaders["Access-Control-Allow-Methods"] = ["GET, POST, PUT, PATCH, DELETE, OPTIONS"];
269-
responseHeaders["Access-Control-Allow-Headers"] = ["Authorization, Content-Type, Accept, Origin"];
270-
responseHeaders["Access-Control-Max-Age"] = ["86400"];
271-
}
272-
273266
callback({
274267
responseHeaders,
275268
});

0 commit comments

Comments
 (0)