Skip to content

Commit

Permalink
Removes grpc and grpcs from the accepted schemes list (#700)
Browse files Browse the repository at this point in the history
* Removes grpc and grpcs from the accepted schemes list

Signed-off-by: Elena Kolevska <[email protected]>

* ruff

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Bernd Verst <[email protected]>
  • Loading branch information
elena-kolevska and berndverst authored Apr 30, 2024
1 parent 9d3fdbc commit 15d0573
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dapr/conf/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class URIParseConfig:
DEFAULT_HOSTNAME = 'localhost'
DEFAULT_PORT = 443
DEFAULT_AUTHORITY = ''
ACCEPTED_SCHEMES = ['dns', 'unix', 'unix-abstract', 'vsock', 'http', 'https', 'grpc', 'grpcs']
ACCEPTED_SCHEMES = ['dns', 'unix', 'unix-abstract', 'vsock', 'http', 'https']


class GrpcEndpoint:
Expand Down Expand Up @@ -40,7 +40,9 @@ def _set_scheme(self):

if self._parsed_url.scheme in ['http', 'https']:
self._scheme = URIParseConfig.DEFAULT_SCHEME
warn('http and https schemes are deprecated, use grpc or grpcs instead')
warn(
'http and https schemes are deprecated for grpc, use myhost?tls=false or myhost?tls=true instead'
)
return

if self._parsed_url.scheme not in URIParseConfig.ACCEPTED_SCHEMES:
Expand Down

0 comments on commit 15d0573

Please sign in to comment.