Skip to content

How do I change env var DOMAIN properly so all attachments still work with the new domain name? #5206

Answered by stefan0xC
ElTopo asked this question in Q&A
Discussion options

You must be logged in to vote

Somehow, I do have a data/config.json

As explained in the linked wiki page this happens if you configure Vaultwarden via the /admin page.

Either way you want to update the DOMAIN setting so that this works because Vaultwarden uses it

vaultwarden/src/auth.rs

Lines 390 to 391 in 96813b1

let host = if CONFIG.domain_set() {
CONFIG.domain()
to create the attachment URL in the returned JSON here:
Ok(Json(json!({
"object": "send-fileDownload",
"id": file_id,
"url": format!("{}/api/sends/{}/{}?t={}", &host.host, send_id, file_id, token)
})))

So if you don't update the domain…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ElTopo
Comment options

@stefan0xC
Comment options

Answer selected by ElTopo
@ElTopo
Comment options

@stefan0xC
Comment options

@ElTopo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants