How to get hostname is server? #956
-
I am trying to get hostname and its port where socketio hosted in server code...
but unfortunately I am getting error How do we achieve it? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
There is no support for this on this package. You need to look at what options the web server that you use gives you, it else use the litter level networking functions in the Python standard library. |
Beta Was this translation helpful? Give feedback.
-
thank you... In |
Beta Was this translation helpful? Give feedback.
-
This comes from the web server, this package does not set the hostname. You should test it with your production web server and ensure you get reliable information. |
Beta Was this translation helpful? Give feedback.
thank you... In
environ
variable I can accessenviron['HOST_NAME']
.. which gives you host name...