fix api redirect for public plugins