In Return of the Jedi, Luke engineers his escape/rescue mission by planning ahead and storing his lightsaber in R2D2's chassis.
How, exactly, does he accomplish this without Jabba's security noticing? I would assume that any droid employed at Jabba's palace or on his sail barge would be fitted with a restraining bolt, but that by no means assures that the droid is safe.
Wouldn't the guards do some sort of security scan, to check for concealed weapons, explosives, etc.? Especially since the two droids literally walked up to the front door and announced that they were gifts. Jabba doesn't really strike me as the trusting type, nor is his business the type where I would expect him to last very long without fairly strict security (bounty hunters walking in the door with thermal detonators notwithstanding).
Is there any canon/Legends explanation for how R2D2 was able to show up without anyone noticing a Jedi weapon in a launcher housed inside of him?