Change Header depending on whether the user is logged in or not
Hello, good afternoon.
I am having some problems to be able to modify the header depending on whether a user is logged in or not.
I have 2 experiences fragments, one for anonymous user (Header) and another experience fragment for logged in users.
The thing is that I don't know what is the best way to make it work, I have tried to make requests to the /system/sling/info.sessionInfo.json file and change the header depending on the response, but in the Cloud environment it doesn't exists or the path is different. Besides, I don't think that way of doing it is very safe.
Can someone guide me a little on this topic?
Thank you so much.