Merge pull request 'mobile update' (#36) from bugfix/iro4ka into master
All checks were successful
Build and Publish Images / build-and-push (push) Successful in 35s
All checks were successful
Build and Publish Images / build-and-push (push) Successful in 35s
Reviewed-on: http://192.168.31.100:3847/Arrelin/family_budget/pulls/36
This commit was merged in pull request #36.
This commit is contained in:
@@ -231,7 +231,7 @@ pub async fn create_app(db: DatabaseConnection) -> Result<Router, DbErr> {
|
||||
.url("/api-docs/openapi.json", ApiDoc::openapi());
|
||||
|
||||
let allowed_origins = std::env::var("ALLOWED_ORIGINS")
|
||||
.unwrap_or_else(|_| "http://localhost:3000,http://localhost:5173,http://localhost:5174,http://localhost:5175,http://localhost:8080".to_string());
|
||||
.unwrap_or_else(|_| "http://localhost:3000,http://localhost:5173,http://localhost:5174,http://localhost:5175,http://localhost:8080,http://localhost:1420,http://tauri.localhost,https://tauri.localhost".to_string());
|
||||
|
||||
let origins: Vec<HeaderValue> = allowed_origins
|
||||
.split(',')
|
||||
|
||||
@@ -12,6 +12,20 @@ export default defineConfig({
|
||||
? 'https://family-budget.duckdns.org'
|
||||
: 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
configure: (proxy) => {
|
||||
if (process.env.TAURI_DEV_HOST) {
|
||||
proxy.on('proxyRes', (proxyRes) => {
|
||||
const cookies = proxyRes.headers['set-cookie'];
|
||||
if (cookies) {
|
||||
proxyRes.headers['set-cookie'] = cookies.map(cookie =>
|
||||
cookie
|
||||
.replace(/;\s*Secure/gi, '')
|
||||
.replace(/;\s*Domain=[^;]*/gi, '')
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"build": {
|
||||
"beforeDevCommand": "npm run dev --prefix ../frontend",
|
||||
"devUrl": "http://localhost:5173",
|
||||
"beforeBuildCommand": "npm run build --prefix ../frontend",
|
||||
"beforeBuildCommand": "VITE_API_BASE_URL=https://family-budget.duckdns.org/api npm run build --prefix ../frontend",
|
||||
"frontendDist": "../frontend/dist"
|
||||
},
|
||||
"app": {
|
||||
|
||||
Reference in New Issue
Block a user