fix link clicks to work when context is /api/