How to disable default REST API endpoints and GraphQL for custom endpoint implementation #12542
Unanswered
only-issues
asked this question in
Q&A
Replies: 1 comment
-
Could you possibly use the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi PayloadCMS team and community,
I'm looking for guidance on how to completely disable the default REST API endpoints (
/api/{collection-slug}
) and GraphQL endpoints to implement custom API endpoints instead.Background & Problem
I've encountered a significant performance and security concern with the default API behavior. When testing the endpoint
/api/{collection-slug}?limit=9999999
, the API processes this request without proper validation or limits, which poses several risks:What I'm Looking For
I need to:
/api/{collection-slug}
)Questions
Current Workaround Attempts
I've tried looking for limit configuration options but couldn't find a way to set reasonable defaults or maximum limits for the REST API endpoints.
Any guidance on best practices for securing PayloadCMS APIs while maintaining custom endpoint flexibility would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions