Closed varadig closed 5 years ago
I don't think this is a problem of tink_web...
its not a problem, it is a question
So if there is no common way, I need to use nodejs to resolve FWDN? It is not a problem, I just looking a best practice to do that
Well yeah i don't think there are any best practice about that in tink web
Ok, so this is what the best I can do:
this.httpServer = js.node.Http.createServer(function(request, response) {
//store somewhere
somewhere = request.headers.get("host");
});
this.httpServer.listen(PORT);
this.container = new NodeContainer(this.httpServer);
If you decide to obtain such information in the header, you can fetch the Context object.
function route (ctx:Context) return ctx.request.header.ofName(HOST);
How to get current FQDN in request like this
@:post function foo(query:{}){ //how to get FQDN?? }