Skip to content

Commit

Permalink
fix: allow case insensitive MX record
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Apr 25, 2024
1 parent fe9e8e2 commit 96be52a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/web/my-account/retrieve-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ async function retrieveDomain(ctx, next) {
)
) {
const existingMX = records.filter(
(record) => !EXCHANGES.includes(record.exchange)
(record) => !EXCHANGES.includes(record.exchange.toLowerCase())
);
if (existingMX.length > 0) {
ctx.state.hasExistingMX = true;
Expand Down
2 changes: 1 addition & 1 deletion app/models/domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ async function getVerificationResults(domain, resolver, purgeCache = false) {
const results = await resolver.resolveMx(domain.name, {
purgeCache: true
});
const exchanges = results.map((result) => result.exchange);
const exchanges = results.map((result) => result.exchange.toLowerCase());
const hasOtherExchanges = exchanges.some(
(exchange) => !config.exchanges.includes(exchange)
);
Expand Down

0 comments on commit 96be52a

Please sign in to comment.