Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Handling config.publish for two domains

Avatar

Avatar
Validate 1
Level 1
aemninja
Level 1

Likes

0 likes

Total Posts

28 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
aemninja
Level 1

Likes

0 likes

Total Posts

28 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
aemninja
Level 1

26-04-2021

Hello Community - We have two production domains and the same content is served for both the domains. In this case, I need to apply the context-aware configuration clientIds for the domains. is there any mechanism to specify two different clientIds to support both the domains. I tried by making changes to config.publish folder but it is picking for only one domain not for two domains at the same time. is there a way to handle this usecase?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

367 likes

Total Posts

462 posts

Correct Reply

134 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

367 likes

Total Posts

462 posts

Correct Reply

134 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile
asutosh_jena
Level 10

26-04-2021

Hi @aemninja 

 

As you have mentioned the same content root is used to serve the content for both the domains, so the context aware config will not be able to differentiate between the domains and will not be able to apply the different client ids.

Now coming to OSGi configuration which will be applied at the run mode irrespective of the domain, that also will not be able to pick the appropriate value.

 

So I will suggest that you write a custom OSGI service which will read the host address and will check if it's from domain1 or domain 2 and based on that you can pass the appropriate value from OSGi.

 

Hope this helps!

Thanks

Answers (1)

Answers (1)

Avatar

Avatar
Coach
Employee
jbrar
Employee

Likes

375 likes

Total Posts

867 posts

Correct Reply

280 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Coach
Employee
jbrar
Employee

Likes

375 likes

Total Posts

867 posts

Correct Reply

280 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile
jbrar
Employee

26-04-2021

If you are trying to add multiple OSGI configurations, you can use an Identifier at the end of the config file name to uniquely define it. See the note below:

 

https://experienceleague.adobe.com/docs/experience-manager-65/deploying/configuring/configuring-osgi...