mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-03-14 13:08:27 +03:00
configuration docs, make test
This commit is contained in:
parent
67a35a6e43
commit
0880dd27ce
6 changed files with 23 additions and 11 deletions
11
.github/workflows/linux.yml
vendored
11
.github/workflows/linux.yml
vendored
|
@ -73,14 +73,19 @@ jobs:
|
|||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||
|
||||
- name: build frontend
|
||||
run: make frontend
|
||||
- name: build
|
||||
run: make
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||
|
||||
# - name: build frontend
|
||||
# run: make frontend
|
||||
|
||||
- name: run tests
|
||||
run: make test
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||
|
||||
|
||||
- name: generate documentation
|
||||
if: matrix.version == 'stable' && (github.repository == 'mCaptcha/mCaptcha')
|
||||
run: make doc
|
||||
|
|
6
Makefile
6
Makefile
|
@ -45,11 +45,7 @@ release: frontend
|
|||
run: frontend
|
||||
cargo run
|
||||
|
||||
test: migrate
|
||||
cd browser && wasm-pack test --release --headless --chrome
|
||||
cd browser && wasm-pack test --release --headless --firefox
|
||||
${MAKE} frontend-test
|
||||
${MAKE} frontend
|
||||
test: frontend-test frontend migrate
|
||||
cargo test --all --all-features --no-fail-fast
|
||||
|
||||
xml-test-coverage: migrate
|
||||
|
|
|
@ -51,7 +51,7 @@ pool = 4
|
|||
|
||||
[smtp]
|
||||
from = "admin@localhost"
|
||||
reply_to = "admin@localhost"
|
||||
reply = "admin@localhost"
|
||||
url = "127.0.0.1"
|
||||
port = 10025
|
||||
username = "admin"
|
||||
|
|
|
@ -62,3 +62,14 @@ domain
|
|||
| ------------------- | --------------------------------------------------------------------------------------- |
|
||||
| `MCAPTCHA_POW_SALT` | Salt has to be long and random |
|
||||
| `MCAPTCHA_POW_GC` | Garbage collection duration in seconds, requires tuning but 30 is a good starting point |
|
||||
|
||||
### SMTP
|
||||
|
||||
| Name | Value |
|
||||
| ------------------------ | ----------------------------------------------- |
|
||||
| `MCAPTCHA_SMTP_FROM` | email address from which the email will be sent |
|
||||
| `MCAPTCHA_SMTP_REPLY_TO` | email address to which reply can be sent |
|
||||
| `MCAPTCHA_URL` | SMTP server URL |
|
||||
| `MCAPTCHA_SMTP_PORT` | SMTP server port |
|
||||
| `MCAPTCHA_SMTP_USERNAME` | SMTP username |
|
||||
| `MCAPTCHA_SMTP_PASSWORD` | SMTP password |
|
||||
|
|
|
@ -46,7 +46,7 @@ async fn verification(
|
|||
) -> ServiceResult<()> {
|
||||
if let Some(smtp) = SETTINGS.smtp.as_ref() {
|
||||
let from = format!("mCaptcha Admin <{}>", smtp.from);
|
||||
let reply_to = format!("mCaptcha Admin <{}>", smtp.reply_to);
|
||||
let reply_to = format!("mCaptcha Admin <{}>", smtp.reply);
|
||||
const SUBJECT: &str = "[mCaptcha] Please verify your email";
|
||||
|
||||
let plain_text = format!(
|
||||
|
|
|
@ -41,7 +41,7 @@ pub struct Captcha {
|
|||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Smtp {
|
||||
pub from: String,
|
||||
pub reply_to: String,
|
||||
pub reply: String,
|
||||
pub url: String,
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
|
|
Loading…
Add table
Reference in a new issue