Skip to content

Add HTTP server settings to the network panel#51981

Open
MindFreeze wants to merge 8 commits into
port-8123from
http-config-ui
Open

Add HTTP server settings to the network panel#51981
MindFreeze wants to merge 8 commits into
port-8123from
http-config-ui

Conversation

@MindFreeze
Copy link
Copy Markdown
Member

@MindFreeze MindFreeze commented May 11, 2026

Proposed change

Adds a form under Settings > System > Network for configuring the HTTP server (port, SSL paths, CORS origins, trusted proxies, IP banning). Backed by the new http/config and http/config/configure WebSocket commands. After save, the user is prompted to restart Home Assistant.

This initial PR only covers the form to change the settings. Will be merged into a feature branch. Handling a good or bad config after a restart of the HTTP server will be done later.

The first commit fixes focus loss in <ha-input-multi>: the existing ${item}-${index} repeat() key destroyed the input element on every keystroke. This wasn't observable before because <ha-form> + text: { multiple: true } is not used anywhere else, and ha-aliases-editor masks it with update-on-blur.
Also had to tweak the margin between the "add" button and the helper text.

Screenshots

image

Here are all the inputs before I added sections:

Details image image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • I have followed the perfect PR recommendations
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

To help with the load of incoming pull requests:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an HTTP server configuration form to the Settings → System → Network panel, backed by new WebSocket endpoints, and includes a small fix to prevent focus loss in multi-value text inputs.

Changes:

  • Add a new “HTTP server” card/form in the network config panel for editing HTTP settings and prompting a restart after save.
  • Introduce a new src/data/http.ts data module to fetch/update HTTP config via WebSocket.
  • Fix <ha-input-multi> list rendering keys to avoid destroying inputs on each keystroke.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/translations/en.json Adds UI strings for the new HTTP server settings card (labels, helpers, restart prompt).
src/panels/config/network/ha-config-section-network.ts Inserts the new HTTP settings form into the Network section layout.
src/panels/config/network/ha-config-http-form.ts Implements the new HTTP settings card, including load/save and restart prompt UI.
src/data/http.ts Adds WebSocket wrappers (http/config/get, http/config/update) and the HttpConfig type.
src/components/input/ha-input-multi.ts Updates repeat() keying to prevent focus loss while editing multi-value fields.

Comment thread src/panels/config/network/ha-config-http-form.ts
Comment thread src/panels/config/network/ha-config-http-form.ts Outdated
Comment thread src/panels/config/network/ha-config-http-form.ts Outdated
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
@MindFreeze MindFreeze marked this pull request as ready for review May 12, 2026 05:41
@timmo001 timmo001 added the Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) label May 12, 2026
@MindFreeze MindFreeze marked this pull request as draft May 13, 2026 06:16
@MindFreeze MindFreeze changed the base branch from dev to port-8123 May 19, 2026 11:39
@MindFreeze MindFreeze marked this pull request as ready for review May 19, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) wait for backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate http: YAML keys into UI configuration elements

4 participants