Add WEBHOOK_SECRET env var for authenticating incoming Owncast webhooks via a ?secret= query parameter. Requests with a missing or incorrect secret are rejected with 401. If unset, all requests are accepted (with a startup warning). Also includes previously uncommitted work: - IRC server password support (IRC_PASSWORD env var, PASS command) - IRC username/ident field in config - IRC_PASSWORD and SELinux volume flag in docker-compose.yml Made-with: Cursor
1.1 KiB
1.1 KiB
IRC Server Password Support
Task
Add support for connecting to password-protected IRC servers by sending the PASS command during connection, and allow setting a custom IRC username.
Changes
- src/config.rs: Added
username: Option<String>field toIrcConfig. AddedBridgeConfig::irc_server_password()method that readsIRC_PASSWORDfrom the environment (returnsOption<String>). Updateddefault_for_test()and tests for the new field and method. - src/irc_task.rs: Set
passwordandusernameon theirccrate'sConfigwhen building the IRC connection, sourcing the password fromBridgeConfig::irc_server_password()and username fromIrcConfig.username. - config.toml: Removed stale
server_passwordfield, added comment aboutIRC_PASSWORDenv var. - config.example.toml: Added commented-out
usernamefield andIRC_PASSWORDenv var documentation.
Usage
Set the IRC_PASSWORD environment variable before running the bridge to authenticate with the IRC server. Optionally set username in [irc] config for a custom ident.
Follow-up
- None identified.