Skip to content

Conversation

@gschier
Copy link
Member

@gschier gschier commented Jan 19, 2026

Instead of storing default headers (User-Agent: yaak and Accept: */*) in each workspace's database record, they are now injected at request time.

Changes

  • Add default_headers() function in Rust, exposed via cmd_default_headers Tauri command
  • Update inherited headers logic to include defaults at the start of the inheritance chain
  • Show "Defaults" label in workspace settings for clarity
  • Migration cleans up workspaces that have unmodified default headers

Benefits

  • Single source of truth: Default headers defined in one place rather than duplicated in every workspace
  • Cleaner workspace data: Workspaces no longer store redundant default headers
  • Easier to modify defaults: Future changes only require updating one location
  • Better UI clarity: Workspace settings shows "Defaults" to distinguish from inherited headers

Instead of storing default headers (User-Agent: yaak, Accept: */*) in each
workspace's database record, they are now injected at request time.

- Add default_headers() function in Rust, exposed via cmd_default_headers
- Update inherited headers logic to include defaults at start of chain
- Show 'Defaults' label in workspace settings for clarity
- Migration cleans up workspaces with unmodified default headers
- Add dedupe_headers() helper to remove duplicate header names, keeping most specific value
- Apply deduplication in frontend (useInheritedHeaders) and backend (http/grpc/websocket requests)
- Hide inherited headers in UI when overridden at current level
@gschier gschier merged commit beb47a6 into main Jan 19, 2026
4 checks passed
@gschier gschier deleted the refactor-default-headers branch January 19, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants