Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add configurable htpasswd location #188

Merged
merged 3 commits into from
Jun 20, 2022
Merged

Conversation

dwmunster
Copy link
Contributor

@dwmunster dwmunster commented Mar 25, 2022

What is the purpose of this change? What does it change?

Allows users to configure the location of the .htpasswd file.

Was the change discussed in an issue or in the forum before?

Closes #187

Checklist

  • I have enabled maintainer edits for this PR
  • I have added tests for all changes in this PR
  • I have added documentation for the changes (in the manual)
  • There's a new file in changelog/unreleased/ that describes the changes for our users (template here)
  • I have run gofmt on the code in all commits
  • All commit messages are formatted in the same style as the other commits in the repo
  • I'm done, this Pull Request is ready for review

@dwmunster
Copy link
Contributor Author

Assuming that updating the readme suffices for updating documentation, I have marked that complete as well. If there is additional documentation needed, I would be glad to add that.

Copy link
Contributor

@rawtaz rawtaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I've added a bunch of comments, both small ones and a couple of more important ones.

mux.go Outdated
}
log.Printf("Loaded htpasswd file: %s", server.HtpasswdPath)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, but if you don't mind I think we should remove this : in order to be consistent with other output/messages.

@@ -100,6 +100,22 @@ func TestGetHandler(t *testing.T) {
t.Errorf("NoAuth=true: expected no error, got %v", err)
}

// With NoAuth = true and custom .htpasswd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be "With NoAuth = false and custom .htpasswd"?

Copy link
Contributor

@rawtaz rawtaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

@rawtaz rawtaz merged commit 6bc87b8 into restic:master Jun 20, 2022
@remram44
Copy link

remram44 commented Dec 3, 2022

Perhaps a new image should be published with that feature?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurable .htpasswd Location
4 participants