Skip to content

Commit

Permalink
Merge pull request #1378 from Fethbita/main
Browse files Browse the repository at this point in the history
Allow underscore in endpoints
  • Loading branch information
andrewwhitehead authored Aug 31, 2021
2 parents c413fab + f4981b9 commit 102d9f1
Show file tree
Hide file tree
Showing 3 changed files with 2,427 additions and 466 deletions.
1 change: 0 additions & 1 deletion aries_cloudagent/messaging/tests/test_valid.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ def test_endpoint(self):
"",
"/path/only",
"https://1.2.3.4?query=true&url=false",
"http://no_tld/bad",
"no-proto:8080/my/path",
"smtp:8080/my/path#fragment",
]
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/messaging/valid.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ class Endpoint(Regexp): # using Regexp brings in nice visual validator cue
EXAMPLE = "https://myhost:8021"
PATTERN = (
r"^[A-Za-z0-9\.\-\+]+:" # scheme
r"//([A-Za-z0-9][.A-Za-z0-9-]+[A-Za-z0-9])+" # host
r"//([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+" # host
r"(:[1-9][0-9]*)?" # port
r"(/[^?&#]+)?$" # path
)
Expand Down
Loading

0 comments on commit 102d9f1

Please sign in to comment.