Custom Equivalent Domains API results in 404 #116

Closed
opened 2026-02-04 17:06:37 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @lorenzschmid on GitHub (Oct 22, 2018).

When trying to set a new "Custom Equivalent Domains" (under Settings > Domain Rules) I receive an error popup: "An error has occurred. An unexpected error has occurred.". Looking at the developer tools I see that the API call PUT https://[domain]/api/settings/domains gets a 404 response.

Using Version 2.4.0 in a docker container.

Originally created by @lorenzschmid on GitHub (Oct 22, 2018). When trying to set a new "Custom Equivalent Domains" (under Settings > Domain Rules) I receive an error popup: "An error has occurred. An unexpected error has occurred.". Looking at the developer tools I see that the API call `PUT https://[domain]/api/settings/domains` gets a 404 response. Using Version 2.4.0 in a docker container.
OVERLORD added the good first issuebug labels 2026-02-04 17:06:37 +03:00
Author
Owner

@mprasil commented on GitHub (Oct 22, 2018):

Thanks for reporting this. We're currently handling the settings via the POST to /api/settings/domains. I guess this got changed in latest Vault and it's now PUT call - just like many other POST calls in the past. This should be easy to fix.

@mprasil commented on GitHub (Oct 22, 2018): Thanks for reporting this. We're currently handling the settings via the `POST` to `/api/settings/domains`. I guess this got changed in latest Vault and it's now `PUT` call - just like many other `POST` calls in the past. This should be easy to fix.
Author
Owner

@lorenzschmid commented on GitHub (Oct 22, 2018):

I don't know Rust but isn't it just about chaning the argument in the following line from post to put?

#[post("/settings/domains", data = "<data>")]
fn post_eq_domains(data: JsonUpcase<EquivDomainData>, headers: Headers, conn: DbConn) -> EmptyResult {
...
@lorenzschmid commented on GitHub (Oct 22, 2018): I don't know Rust but isn't it just about chaning the argument in [the following line](https://github.com/dani-garcia/bitwarden_rs/blob/master/src/api/core/mod.rs#L218) from `post` to `put`? ```rust #[post("/settings/domains", data = "<data>")] fn post_eq_domains(data: JsonUpcase<EquivDomainData>, headers: Headers, conn: DbConn) -> EmptyResult { ... ```
Author
Owner

@mprasil commented on GitHub (Oct 22, 2018):

Almost. Ideally we want to create alias so that both old and new API works. (so that we don't break old clients)

@mprasil commented on GitHub (Oct 22, 2018): Almost. Ideally we want to create alias so that both old and new API works. (so that we don't break old clients)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#116