I have following menu defined with access callback function. As You can see this is a hack so I can use REST via GET ( normally Services do not offer this ).
All my endpoints are defined /rest/api/[endpoint]
this is a /config
one:
function MYMODULE_menu() {
$menus['rest/api/config'] = array(
'title' => 'Configuration',
'page callback' => 'MYMODULE_config',
'access callback' => 'MYMODULE_access_callback_basic_auth',
'type' => MENU_CALLBACK,
);
return $menus;
}
The issue is that the MYMODULE_access_callback_basic_auth
is called 5-times for every request.
Can You help me why this happens ?