mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 18:15:39 +00:00
changed login route
This commit is contained in:
@@ -26,30 +26,7 @@ pub use super::mcaptcha::duration::GetDurationResp;
|
||||
pub use super::mcaptcha::is_authenticated;
|
||||
pub use super::mcaptcha::levels::I32Levels;
|
||||
|
||||
//lazy_static! {
|
||||
// pub static ref CORS: Cors = Cors::default()
|
||||
// .allow_any_origin()
|
||||
// .allowed_methods(vec!["POST"])
|
||||
// .allow_any_header()
|
||||
// .max_age(0)
|
||||
// .send_wildcard();
|
||||
//}
|
||||
|
||||
//pub fn services(cfg: &mut web::ServiceConfig) -> web::Scope<impl actix_service::ServiceFactory> {
|
||||
// let captcha_api_cors = Cors::default()
|
||||
// .allow_any_origin()
|
||||
// .allowed_methods(vec!["POST"])
|
||||
// .allow_any_header()
|
||||
// .max_age(0)
|
||||
// .send_wildcard();
|
||||
//
|
||||
// web::scope("/api/v1/pow/*")
|
||||
// .wrap(captcha_api_cors)
|
||||
// .configure(pow_services)
|
||||
//
|
||||
// // pow
|
||||
//}
|
||||
|
||||
// middleware protected by scope
|
||||
pub fn services(cfg: &mut web::ServiceConfig) {
|
||||
let captcha_api_cors = Cors::default()
|
||||
.allow_any_origin()
|
||||
@@ -63,14 +40,11 @@ pub fn services(cfg: &mut web::ServiceConfig) {
|
||||
.wrap(captcha_api_cors)
|
||||
.configure(intenral_services),
|
||||
);
|
||||
|
||||
// cfg.service(
|
||||
|
||||
// cfg.service(get_config::get_config);
|
||||
// cfg.service(verify_pow::verify_pow);
|
||||
// cfg.service(verify_token::validate_captcha_token);
|
||||
}
|
||||
|
||||
// internal route aggregator, it's easy to use macros
|
||||
// to denote paths than having to type it out
|
||||
// but remember, final path = scope + macro path
|
||||
fn intenral_services(cfg: &mut web::ServiceConfig) {
|
||||
cfg.service(get_config::get_config);
|
||||
cfg.service(verify_pow::verify_pow);
|
||||
|
||||
Reference in New Issue
Block a user