mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-20 17:02:53 -04:00
tauri cors fix (#1344)
This commit is contained in:
+1
@@ -72,6 +72,7 @@ pub(super) async fn handle_image_edit_artcraft_via_router(
|
||||
image_inputs,
|
||||
resolution,
|
||||
aspect_ratio,
|
||||
quality: None, // TODO(bt): Add quality
|
||||
image_batch_count: request.image_count.map(|n| n as u16),
|
||||
request_mismatch_mitigation_strategy: RequestMismatchMitigationStrategy::PayMoreUpgrade,
|
||||
generation_mode_mismatch_strategy: None,
|
||||
|
||||
+1
@@ -50,6 +50,7 @@ pub(super) async fn handle_text_to_image_artcraft_via_router(
|
||||
image_inputs,
|
||||
resolution,
|
||||
aspect_ratio,
|
||||
quality: None, // TODO: Add quality
|
||||
image_batch_count: request.number_images.map(|n| n as u16),
|
||||
request_mismatch_mitigation_strategy: RequestMismatchMitigationStrategy::PayMoreUpgrade,
|
||||
generation_mode_mismatch_strategy: None,
|
||||
|
||||
@@ -8,6 +8,88 @@
|
||||
"app": {
|
||||
"withGlobalTauri": true,
|
||||
"windows": [
|
||||
]
|
||||
],
|
||||
"security": {
|
||||
"assetProtocol": {
|
||||
"enable": true,
|
||||
"scope": ["**"]
|
||||
},
|
||||
"csp": {
|
||||
"default-src": [
|
||||
"'self'",
|
||||
"'unsafe-eval'",
|
||||
"'unsafe-inline'",
|
||||
"blob:",
|
||||
"data:",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
"https://www.google-analytics.com",
|
||||
"https://www.googletagmanager.com",
|
||||
"ipc://localhost",
|
||||
"tauri://localhost"
|
||||
],
|
||||
"connect-src": [
|
||||
"'self'",
|
||||
"'unsafe-eval'",
|
||||
"'unsafe-inline'",
|
||||
"asset:",
|
||||
"blob:",
|
||||
"data:",
|
||||
"http://ipc.localhost",
|
||||
"https://*.clarity.ms",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
"https://asset.localhost",
|
||||
"https://unpkg.com/detect-gpu@5.0.70/",
|
||||
"https://www.google-analytics.com",
|
||||
"https://www.googletagmanager.com",
|
||||
"ipc://localhost",
|
||||
"tauri://localhost"
|
||||
],
|
||||
"font-src": "*",
|
||||
"img-src": [
|
||||
"",
|
||||
"'self'",
|
||||
"'unsafe-inline'",
|
||||
"*",
|
||||
"blob:",
|
||||
"data:",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
"ipc://localhost",
|
||||
"tauri://localhost"
|
||||
],
|
||||
"script-src": [
|
||||
"'self'",
|
||||
"'unsafe-eval'",
|
||||
"'unsafe-inline'",
|
||||
"'wasm-unsafe-eval'",
|
||||
"asset:",
|
||||
"blob:",
|
||||
"data:",
|
||||
"https://*.clarity.ms",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
"https://*.unpkg.com",
|
||||
"https://clarity.ms",
|
||||
"https://unpkg.com",
|
||||
"ipc://localhost",
|
||||
"tauri:",
|
||||
"tauri://localhost"
|
||||
],
|
||||
"style-src": [
|
||||
"'self'",
|
||||
"'unsafe-eval'",
|
||||
"'unsafe-inline'",
|
||||
"blob:",
|
||||
"data:",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
"https://fonts.googleapis.com",
|
||||
"ipc://localhost",
|
||||
"tauri://localhost"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
"'unsafe-eval'",
|
||||
"'unsafe-inline'",
|
||||
"asset:",
|
||||
"https://asset.localhost",
|
||||
"blob:",
|
||||
"data:",
|
||||
"http://ipc.localhost",
|
||||
"https://*.clarity.ms",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
"https://*.clarity.ms",
|
||||
"https://asset.localhost",
|
||||
"https://unpkg.com/detect-gpu@5.0.70/",
|
||||
"https://www.google-analytics.com",
|
||||
"https://www.googletagmanager.com",
|
||||
@@ -51,7 +51,18 @@
|
||||
"tauri://localhost"
|
||||
],
|
||||
"font-src": "*",
|
||||
"img-src": "* data: blob: 'unsafe-inline'",
|
||||
"img-src": [
|
||||
"",
|
||||
"'self'",
|
||||
"'unsafe-inline'",
|
||||
"*",
|
||||
"blob:",
|
||||
"data:",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
"ipc://localhost",
|
||||
"tauri://localhost"
|
||||
],
|
||||
"script-src": [
|
||||
"'self'",
|
||||
"'unsafe-eval'",
|
||||
@@ -60,7 +71,6 @@
|
||||
"asset:",
|
||||
"blob:",
|
||||
"data:",
|
||||
"tauri:",
|
||||
"https://*.clarity.ms",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
@@ -68,6 +78,7 @@
|
||||
"https://clarity.ms",
|
||||
"https://unpkg.com",
|
||||
"ipc://localhost",
|
||||
"tauri:",
|
||||
"tauri://localhost"
|
||||
],
|
||||
"style-src": [
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
"'unsafe-eval'",
|
||||
"'unsafe-inline'",
|
||||
"asset:",
|
||||
"https://asset.localhost",
|
||||
"blob:",
|
||||
"data:",
|
||||
"http://ipc.localhost",
|
||||
"https://*.clarity.ms",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
"https://*.clarity.ms",
|
||||
"https://asset.localhost",
|
||||
"https://unpkg.com/detect-gpu@5.0.70/",
|
||||
"https://www.google-analytics.com",
|
||||
"https://www.googletagmanager.com",
|
||||
@@ -50,7 +50,18 @@
|
||||
"tauri://localhost"
|
||||
],
|
||||
"font-src": "*",
|
||||
"img-src": "* data: blob: 'unsafe-inline'",
|
||||
"img-src": [
|
||||
"",
|
||||
"'self'",
|
||||
"'unsafe-inline'",
|
||||
"*",
|
||||
"blob:",
|
||||
"data:",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
"ipc://localhost",
|
||||
"tauri://localhost"
|
||||
],
|
||||
"script-src": [
|
||||
"'self'",
|
||||
"'unsafe-eval'",
|
||||
@@ -59,7 +70,6 @@
|
||||
"asset:",
|
||||
"blob:",
|
||||
"data:",
|
||||
"tauri:",
|
||||
"https://*.clarity.ms",
|
||||
"https://*.fakeyou.com",
|
||||
"https://*.storyteller.ai",
|
||||
@@ -67,6 +77,7 @@
|
||||
"https://clarity.ms",
|
||||
"https://unpkg.com",
|
||||
"ipc://localhost",
|
||||
"tauri:",
|
||||
"tauri://localhost"
|
||||
],
|
||||
"style-src": [
|
||||
|
||||
Generated
+1
@@ -154,6 +154,7 @@
|
||||
"react-hot-toast": "^2.5.2",
|
||||
"react-image-crop": "^11.0.5",
|
||||
"react-konva": "^18.2.10",
|
||||
"react-resizable-panels": "*",
|
||||
"react-router": "^6.26.1",
|
||||
"react-router-dom": "^6.26.1",
|
||||
"react-virtualized": "^9.22.6",
|
||||
|
||||
Reference in New Issue
Block a user