mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-12-18 20:04:17 +01:00
Fix CORS issues in desktop app (#5019)
# Description of Changes In the 2.0.0 release version, the frontend can't connect to the backend on my machine because all the network requests 403. I think this is because of CORS issues, and supposedly these will be fixed by using a different Spring function, which is more lenient on URL schemes (needs to allow `tauri://localhost` here, which isn't a standard URL)
This commit is contained in:
parent
31b3219169
commit
bc11875081
@ -42,7 +42,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
// Tauri v1 uses tauri://localhost, v2 uses http(s)://tauri.localhost
|
||||
logger.info("Tauri mode detected - enabling CORS for Tauri protocols (v1 and v2)");
|
||||
registry.addMapping("/**")
|
||||
.allowedOrigins(
|
||||
.allowedOriginPatterns(
|
||||
"tauri://localhost",
|
||||
"http://tauri.localhost",
|
||||
"https://tauri.localhost")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user