[oauth] add host config option (#2806)
This commit is contained in:
@@ -1783,6 +1783,16 @@ Description
|
||||
in `cache <cache.file_>`__.
|
||||
|
||||
|
||||
extractor.oauth.host
|
||||
--------------------
|
||||
Type
|
||||
``string``
|
||||
Default
|
||||
``"localhost"``
|
||||
Description
|
||||
Host name / IP address to bind to during OAuth authorization.
|
||||
|
||||
|
||||
extractor.oauth.port
|
||||
--------------------
|
||||
Type
|
||||
|
||||
@@ -198,6 +198,7 @@
|
||||
{
|
||||
"browser": true,
|
||||
"cache": true,
|
||||
"host": "localhost",
|
||||
"port": 6414
|
||||
},
|
||||
"paheal":
|
||||
|
||||
@@ -41,7 +41,8 @@ class OAuthBase(Extractor):
|
||||
stdout_write("Waiting for response. (Cancel with Ctrl+c)\n")
|
||||
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
server.bind(("localhost", self.config("port", 6414)))
|
||||
server.bind((self.config("host", "localhost"),
|
||||
self.config("port", 6414)))
|
||||
server.listen(1)
|
||||
|
||||
# workaround for ctrl+c not working during server.accept on Windows
|
||||
|
||||
Reference in New Issue
Block a user