changed login route

This commit is contained in:
realaravinth
2021-04-30 18:06:28 +05:30
parent 6e63771868
commit 343c37ae1c
7 changed files with 13 additions and 345 deletions

View File

@@ -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);