Skip to content

Commit

Permalink
corrected types of port and flag parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ-Author committed Oct 21, 2024
1 parent c6b8ba8 commit 7ddd6b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ontologytimemachine/custom_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def queue_response(self, response):

sys.argv += [
"--hostname", config.host,
"--port", config.port,
"--port", str(config.port),
# "--log-level", config.logLevel.name,
'--insecure-tls-interception', # without it the proxy would not let through a response using an invalid upstream certificate in interception mode
# since there currently is a bug in proxypy when a connect request uses an IP address instead of a domain name
Expand Down
13 changes: 7 additions & 6 deletions ontologytimemachine/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Config:
disableRemovingRedirects: bool = False
timestamp: str = ""
host: str = "0.0.0.0"
port: str = "8896"
port: int = 8898
# manifest: Dict[str, Any] = None


Expand Down Expand Up @@ -123,7 +123,7 @@ def parse_arguments(config_str: str = "") -> Config:

parser.add_argument(
"--patchAcceptUpstream",
type=bool,
action="store_true",
default=default_cfg.ontoFormatConf.patchAcceptUpstream,
help="Defines if the Accept Header is patched upstream in original mode. (default: %(default)s)",
)
Expand All @@ -140,7 +140,7 @@ def parse_arguments(config_str: str = "") -> Config:
# Enable/disable mode to only proxy requests to ontologies
parser.add_argument(
"--restrictedAccess",
type=bool,
action="store_true",
default=default_cfg.restrictedAccess,
help="Enable/disable mode to only proxy requests to ontologies stored in Archivo. (default: %(default)s)",
)
Expand All @@ -157,7 +157,7 @@ def parse_arguments(config_str: str = "") -> Config:
# Enable/disable inspecting or removing redirects
parser.add_argument(
"--disableRemovingRedirects",
type=bool,
action="store_true",
default=default_cfg.disableRemovingRedirects,
help="Enable/disable inspecting or removing redirects. (default: %(default)s)",
)
Expand Down Expand Up @@ -190,9 +190,10 @@ def parse_arguments(config_str: str = "") -> Config:
# Port
parser.add_argument(
"--port",
type=str,
type=int,
default=default_cfg.port,
help="Port number to bind the proxy to. (default: %(default)s)",
help="port"
# help="Port number to bind the proxy to. (default: %(default)s)",
)

if config_str:
Expand Down

0 comments on commit 7ddd6b9

Please sign in to comment.