Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
270229e7
Commit
270229e7
authored
May 22, 2017
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comments
parent
222138ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
HttpHelper.cs
Titanium.Web.Proxy/Helpers/HttpHelper.cs
+7
-2
No files found.
Titanium.Web.Proxy/Helpers/HttpHelper.cs
View file @
270229e7
...
...
@@ -62,8 +62,10 @@ namespace Titanium.Web.Proxy.Helpers
{
/*all needed domain in lower case*/
/*for now just hard code most common ones */
string
[]
col
=
{
".com"
,
".net"
,
".org"
,
".cn"
,
".co.uk"
,
".co.in"
,
".co.us"
};
string
[]
col
=
{
".com"
,
".net"
,
".org"
,
".cn"
,
".us"
,
".in"
,
".co.uk"
,
".co.in"
,
".co.us"
};
foreach
(
string
name
in
col
)
{
...
...
@@ -72,6 +74,9 @@ namespace Titanium.Web.Proxy.Helpers
int
idx
=
hostname
.
LastIndexOf
(
name
);
int
sec
=
hostname
.
Substring
(
0
,
idx
-
1
).
LastIndexOf
(
'.'
);
//only for subdomains we need wild card
//example www.google.com or gstatic.google.com
//but NOT for google.com
if
(
hostname
.
Substring
(
0
,
sec
+
1
).
Contains
(
"."
))
{
var
rootDomain
=
hostname
.
Substring
(
sec
+
1
);
...
...
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