mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 17:08:30 +01:00
Do not set domain for ALIAS_DOMAINS
This commit is contained in:
parent
abd23cf08f
commit
76661d12d3
1 changed files with 5 additions and 3 deletions
|
@ -3,7 +3,7 @@ from flask import jsonify, request
|
||||||
from flask_cors import cross_origin
|
from flask_cors import cross_origin
|
||||||
|
|
||||||
from app.api.base import api_bp, verify_api_key
|
from app.api.base import api_bp, verify_api_key
|
||||||
from app.config import MAX_NB_EMAIL_FREE_PLAN
|
from app.config import MAX_NB_EMAIL_FREE_PLAN, ALIAS_DOMAINS
|
||||||
from app.dashboard.views.custom_alias import verify_prefix_suffix
|
from app.dashboard.views.custom_alias import verify_prefix_suffix
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
from app.log import LOG
|
from app.log import LOG
|
||||||
|
@ -64,8 +64,10 @@ def new_custom_alias():
|
||||||
|
|
||||||
if alias_suffix.startswith("@"):
|
if alias_suffix.startswith("@"):
|
||||||
alias_domain = alias_suffix[1:]
|
alias_domain = alias_suffix[1:]
|
||||||
domain = CustomDomain.get_by(domain=alias_domain)
|
if alias_domain not in ALIAS_DOMAINS:
|
||||||
gen_email.custom_domain_id = domain.id
|
domain = CustomDomain.get_by(domain=alias_domain)
|
||||||
|
LOG.d("set alias %s to domain %s", full_alias, domain)
|
||||||
|
gen_email.custom_domain_id = domain.id
|
||||||
|
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue