tauri.conf.json — Application & Security Configuration

Window

The app opens a single window titled base_station at 800×600. devtools is enabled, meaning the browser DevTools can be opened in development builds.

Content Security Policy

The CSP is configured to be strict by default while allowing the specific localhost ports needed for video:

Directive

What it allows

default-src

Only the app itself and Tauri's custom protocol

script-src

Self + inline scripts (required by SvelteKit)

img-src

App assets + the three MJPEG stream ports (5000, 5001, 5002)

media-src

The three MJPEG stream ports

connect-src

All localhost ports (for dev server, WebSockets) +

api.ipify.org

The asset protocol is enabled with scope $APPDATA/**, which allows the frontend to read files from the app data directory (e.g. saved maps and images) using the asset:// protocol.

For future developers: Security gives a lot of problems (and they vary between devices and platforms), if something isn't loading always check if it is because of permissions. Thus far setting security to unrestricted does not fix those issues.

Bundled resources

The models/* glob in bundle.resources ensures all 3D model files in src-tauri/models/ are included in the packaged application. This is what load_model.rs reads from in release builds.


Revision #3
Created 2026-04-14 13:22:31 UTC by Candela Cimadevilla Gonzalez
Updated 2026-04-16 09:19:13 UTC by Candela Cimadevilla Gonzalez