#1 2014-11-01 11:44:50

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 506

Access Ctxt.InHeaders from MVC - Method

Hi AB great work with MVC !!

Now i have a question :

How can I access the Ctxt.InHeaders from one of the MVCApplication Method like Default or Login ?

I want to use the Subdomain/Domain as Switch

Customer1.localhost -> Site for Customer1
Customer2.localhost -> Site for Customer2
Customer3.xxx -> Site for Customer3

In Default / Login i need the Value of the SubDomain.

Last edited by itSDS (2014-11-01 11:49:50)


Rad Studio 12.1 Santorini

Offline

#2 2014-11-01 12:44:28

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: Access Ctxt.InHeaders from MVC - Method

If you are running with the TSQLRestServer.URI() context, you have access to the threadvar ServiceContext.Request field...
So to all the incoming information.
smile

You may also consider running several TMVCApplication, one per customer.

Offline

#3 2014-11-02 00:32:36

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 506

Re: Access Ctxt.InHeaders from MVC - Method

tyvm with

  Result := ServiceContext.Request.InHeader['Host'];

i get what i want smile


Rad Studio 12.1 Santorini

Offline

Board footer

Powered by FluxBB