# tauri.conf.json — Application & Security Configuration

### Window

<span style="white-space: pre-wrap;">The app opens a single window titled </span>`<span class="editor-theme-code">base_station</span>`<span style="white-space: pre-wrap;"> at 800×600. </span>`<span class="editor-theme-code">devtools</span>`<span style="white-space: pre-wrap;"> is enabled, meaning the browser DevTools can be opened in development builds.</span>

### Content Security Policy

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

<table id="bkmrk-directivewhat-it-all"><colgroup><col></col><col></col></colgroup><tbody><tr><th>Directive

</th><th>What it allows

</th></tr><tr><td>`<span class="editor-theme-code">default-src</span>`

</td><td>Only the app itself and Tauri's custom protocol

</td></tr><tr><td>`<span class="editor-theme-code">script-src</span>`

</td><td>Self + inline scripts (required by SvelteKit)

</td></tr><tr><td>`<span class="editor-theme-code">img-src</span>`

</td><td>App assets + the three MJPEG stream ports (5000, 5001, 5002)

</td></tr><tr><td>`<span class="editor-theme-code">media-src</span>`

</td><td>The three MJPEG stream ports

</td></tr><tr><td>`<span class="editor-theme-code">connect-src</span>`

</td><td><span style="white-space: pre-wrap;">All localhost ports (for dev server, WebSockets) + </span>

`<span class="editor-theme-code">api.ipify.org</span>`

</td></tr></tbody></table>

<span style="white-space: pre-wrap;">The asset protocol is enabled with scope </span>`<span class="editor-theme-code">$APPDATA/**</span>`<span style="white-space: pre-wrap;">, which allows the frontend to read files from the app data directory (e.g. saved maps and images) using the </span>`<span class="editor-theme-code">asset://</span>`<span style="white-space: pre-wrap;"> protocol.</span>

<p class="callout warning">**For future developers:**<span style="white-space: pre-wrap;"> 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.</span></p>

### Bundled resources

<span style="white-space: pre-wrap;">The </span>`<span class="editor-theme-code">models/*</span>`<span style="white-space: pre-wrap;"> glob in </span>`<span class="editor-theme-code">bundle.resources</span>`<span style="white-space: pre-wrap;"> ensures all 3D model files in </span>`<span class="editor-theme-code">src-tauri/models/</span>`<span style="white-space: pre-wrap;"> are included in the packaged application. This is what </span>`<span class="editor-theme-code">load_model.rs</span>`<span style="white-space: pre-wrap;"> reads from in release builds.</span>