How do I access current site handle in Craft 3 controllers When my multisite is set up as @web/site, I cannot access the current site handle from my controllers.

Craft::$app-&gt;getSites()-&gt;currentSite-&gt;handle


I think this is because my form action defaults to the root site ie @web/actions/controller... rather than @web/site/actions/controller...

Is there a way to get the current site or do I need to pass it into the controller from the form?
I know this is a year and a half late, but maybe it helps someone else. I have a large multi-site project with a site for country and language. For example:


Germany (German) - default - /de-de/
Germany (English) - /en-de/
Austria (German) - /de-at/
Austria (English) - /en-at/
etc


I was having this problem when posting to one of my controller's actions and then trying to get the currentSite within my plugin via Craft::$app-&gt;getSites()-&gt;currentSite.

In my JavaScript, my action looked like:

/actions/pluginHandle/controllerClass/actionMethod


Whenever I'd fetch the current site with Craft::$app-&gt;getSites()-&gt;currentSite it would always return the default site (Germany/German), and that's because I wasn't including the first URL segment (to get Austria/English, for example):

/en-at/actions/pluginHandle/controllerClass/actionMethod


Without that, Craft was resorting to getting the default site.