[GH-ISSUE #230] Custom Equivalent Domains API results in 404 #115

Closed
opened 2026-03-03 01:25:04 +03:00 by kerem · 3 comments
Owner

Originally created by @lorenzschmid on GitHub (Oct 22, 2018).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/230

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). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/230 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.
kerem 2026-03-03 01:25:04 +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.

<!-- gh-comment-id:431785637 --> @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 {
...
<!-- gh-comment-id:431826987 --> @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)

<!-- gh-comment-id:431829309 --> @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.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#115
No description provided.