Skip to content

Commit 05b52c3

Browse files
committed
SimpleChatTC:SimpleProxy: Include a sample config file
with allowed domains set to few sites in general to show its use this includes some sites which allow search to be carried out through them as well as provide news aggregation
1 parent 7f00709 commit 05b52c3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"allowed.domains": [
3+
"^www\\.bing\\.com$",
4+
".*\\.yahoo\\.com$",
5+
"^search\\.yahoo\\.com$",
6+
".*\\.brave\\.com$",
7+
"^search\\.brave\\.com$",
8+
".*\\.duckduckgo\\.com$",
9+
".*\\.google\\.com$",
10+
"^google\\.com$"
11+
]
12+
}

tools/server/public_simplechat/local.tools/simpleproxy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def validate_url(url: str, tag: str):
108108
Implement a re based filter logic on the specified url.
109109
"""
110110
urlParts = urllib.parse.urlparse(url)
111+
print(f"DBUG:ValidateUrl:{urlParts}, {urlParts.hostname}")
111112
urlHName = urlParts.hostname
112113
if not urlHName:
113114
return UrlReqResp(False, 400, f"WARN:{tag}:Missing hostname in Url")

0 commit comments

Comments
 (0)