| commit | 36b5cba2d032908f7e2d5355c512c7541fad4861 | [log] [tgz] |
|---|---|---|
| author | Jason Westover <jwestover@nvidia.com> | Thu Feb 12 09:15:15 2026 -0600 |
| committer | Jason Westover <jwestover@nvidia.com> | Mon Feb 16 09:11:31 2026 -0600 |
| tree | 121b1e2cc658306eceb26f70a43366220bb307ea | |
| parent | 414817eb708a8499183e6ab2a52d047ffeb6c249 [diff] |
Fix webassets to support Vite build output
The webui-vue project migrated from webpack to Vite, which changes
the output filenames. Vite names entry chunks as index.[hash].js
instead of webpack's app.[hash].js. The starts_with("index.") check
in addFile() was remapping these JS/CSS files to their parent directory
path (intended only for index.html), causing 404 errors when the
browser requested the actual asset URLs.
Restrict the index file detection to only apply to .html files, so
that index.html is still correctly mapped to "/" while other files
starting with "index." are served at their actual paths.
Also broaden the etag hash detection from hex-only characters to full
alphanumeric to support Vite's base64-style content hashes alongside
webpack's hex hashes.
Add unit tests for getStaticEtag() covering both webpack and Vite hash
formats, path prefixes, edge cases, and validation of hash length and
character constraints.
Tested:
Unit tests pass
Vite-based webui-vue loads and caches etags
Change-Id: I3f7d2e062d0fd8be4ded7889b64a7228b4a6459b
Signed-off-by: Jason Westover <jwestover@nvidia.com>
Signed-off-by: Ed Tanous <etanous@nvidia.com>
This component attempts to be a "do everything" embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL. Http1 and http2 are supported using ALPN registration for TLS connections and h2c upgrade header for http connections.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson setup builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects.
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data namespace.
bmcweb uses /tmp/bmcweb for temporary file storage during multipart form uploads. This directory is automatically cleaned up by systemd on service restart via the TemporaryFileSystem directive in the service file.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.
bmcweb supports various forms of http compression, including zstd and gzip. Client headers are observed to determine whether compressed payloads are supported.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.