Changing the external HTTP config/www URL path from "/local/"

Hello all,

I have HASSIO running on a generic x86-64 install.

DuckDNS with Lets Encrypt is configured, and I have enabled IP bans, cors origins etc.

I have only two requirements from the setup, firstly is the most obvious, remote access, this works fine, and my local router is forwarding 443 traffic to 8123 of the machine.

The second, is hosting a single public key in a .pem format, in order to register an applications access through a generated partner authentication token and call a public key endpoint, using said token.

In order to register the application, the api server (external) needs to be able to download the public-key, however, it expects the file structure to be "{domain}/.well-known/appspecific/{public-key_name}.pem. The HTTP integration (internal) exposes the files in the config/www folder to {domain}/local/.

The API does NOT support paths, (i.e. i cannot include /local/ in the string for the domain) as a POST returns:

“Invalid domain: {domain}/local. Ensure that domain is lowercase and starts without https://”

Removing the /local/ path successfully completes, but returns a 404 error from HASSIO as the path does not exist:

“error”: “Public key download failed for https://{domain}/.well-known/appspecific/{filename}.pem, error: must return 200 response code, got 404; body: 404: Not Found”

How can i access the configuration of the HTTP integration and change the default path from /local/ to whatever i need??

1 Like

I’m interested in this as well (for hosting the public key needed by Tesla Fleet API). Did you find a solution?

Nothing yet

I would say that you do not want to be changing the local path to something else as other things rely on this being there which may break.

What you can do is register a url path to pont to a file directory. However, you can not do this with config but would need to write a small custom integration to do it.

Its a very simple integration if you would like help doing it.

EDIT: Oh and you could also do it by using a url alias via something like nginx proxy.