Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eterfund-api-email
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
eterfund-api-email
Commits
84bd3f83
Commit
84bd3f83
authored
Nov 21, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CORS headers & warn about common email typos
parent
9f2e979d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
svcCheckEmail.php
svcCheckEmail.php
+11
-1
No files found.
svcCheckEmail.php
View file @
84bd3f83
...
@@ -2,12 +2,22 @@
...
@@ -2,12 +2,22 @@
header
(
'Access-Control-Allow-Origin: *'
);
header
(
'Access-Control-Allow-Origin: *'
);
header
(
'Access-Control-Allow-Headers: X-Requested-With, Content-Type'
);
header
(
'Access-Control-Allow-Headers: X-Requested-With, Content-Type'
);
header
(
'Access-Control-Allow-Methods: GET, POST'
);
header
(
'Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'
);
header
(
'Access-Control-Expose-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'
);
error_reporting
(
0
);
error_reporting
(
0
);
function
typeddomain
(
$domain
)
function
typeddomain
(
$domain
)
{
{
$blacklist
=
array
(
"lnbox.ru"
,
"meil.ru"
,
"maile.ru"
,
"meil.ru"
,
"wail.ru"
,
"maiil.ru"
,
"maij.ru"
,
"mfil.ru"
,
"yandeks.ru"
,
"yandexs.ru"
,
"jandex.ru"
,
"yahdex.ru"
,
"yanbex.ru"
,
"ayndex.ru"
,
"yndex.ru"
,
"yanddex.ru"
,
"gmal.com"
,
"gmal.ru"
,
"gmeil.com"
,
"gmauil.com"
,
"rabler.ru"
,
"ramdler.ru"
,
"ranbler.ru"
,
"gmail.ru"
,
"gmal.com"
);
// TODO: русские буквы в любом виде
// I know, yadex.ru and mail.com are exists, but we will ban it
// TODO: тут мы вполне можем предложить автоисправление
$blacklist
=
array
(
"lnbox.ru"
,
"indox.ru"
,
"meil.ru"
,
"maile.ru"
,
"meil.ru"
,
"mali.ru"
,
"wail.ru"
,
"maiil.ru"
,
"maij.ru"
,
"mfil.ru"
,
"mai.ru"
,
"qmail.com"
,
"mal.ru"
,
"vail.ru"
,
"yandeks.ru"
,
"yandexs.ru"
,
"jandex.ru"
,
"yahdex.ru"
,
"yanbex.ru"
,
"ayndex.ru"
,
"yndex.ru"
,
"yanddex.ru"
,
"yamdex.ru"
,
"yundex.ru"
,
"eandex.ru"
,
"yadex.ru"
,
"gmal.com"
,
"gmal.ru"
,
"gmeil.com"
,
"gmauil.com"
,
"gmail.ru"
,
"gmal.com"
,
"dmail.com"
,
"mail.com"
,
"rabler.ru"
,
"ramdler.ru"
,
"ranbler.ru"
);
return
in_array
(
$domain
,
$blacklist
);
return
in_array
(
$domain
,
$blacklist
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment