Skip to content

Commit

Permalink
Merge pull request #29 from trofi/fix-non-standalone
Browse files Browse the repository at this point in the history
src/types.rs: fix complete_challenge() for non-standalone mode
  • Loading branch information
1c3t3a committed May 6, 2024
2 parents 3c4cf5e + 7b77d54 commit 39bdad3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types.rs
Expand Up @@ -361,7 +361,7 @@ impl ChallengeAuthorisation {
private_key: &Rsa<Private>,
standalone: bool,
) -> Result<Nonce> {
const CHALLENGE_PATH: &str = "/.well-known/acme-challenge";
const CHALLENGE_PATH: &str = ".well-known/acme-challenge";

let thumbprint = jwk(private_key)?;
let mut hasher = Sha256::new();
Expand All @@ -381,7 +381,7 @@ impl ChallengeAuthorisation {
if standalone {
std::thread::spawn(|| {
rouille::start_server("0.0.0.0:80", move |request| {
if request.raw_url() == format!("{}/{}", CHALLENGE_PATH, challenge_infos.token)
if request.raw_url() == format!("/{}/{}", CHALLENGE_PATH, challenge_infos.token)
{
rouille::Response::text(challenge_content.clone())
} else {
Expand Down

0 comments on commit 39bdad3

Please sign in to comment.