Routing issue with url containing hash

Hello hello,

I’m implementing a simple routing configuration that allows the panel the be access from anywhere. It is very rudimentary but usually does the job.

return [
  'routes' => [
    [
      'pattern' => '(:all)/panel',
      'action' => function ($all) {
        return go(site()->url() . '/panel');
      }
    ],
  ],
];

This configuration works fine until a hash is introduced in the url (for example mysite.com/#some-id/panel doesn’t work).

I was wondering wether I am doing anything wrong or wether this is simply not possible.

It appears that anything following the hash is ignored by the router, since the following didn’t throw the expected error.

Requested url: https://mysite.com/#some-id/panel
Route:

return [
  'routes' => [
    [
      'pattern' => '#some-id/panel',
      'action' => function ($all) {
        throw new Exception("Error Processing Request", 1);
      }
    ],
  ],
];

Thank you in advance
NG <3

The fragment (anything after the #) is purely clientside, it’s not sent in the request, take a look at the network tab to see what happens. Therefore, the route does not kick in.