Overslaan "Toegang tot applicatie autoriseren"

If you’re coding up a plugin, you should develop new routes in a plugin-mounted controller that directly perform the tasks you need. These routes can all share a before_action that sets the Access-Control-Allow-{Origin, Headers, Credentials} response headers (echo the Origin request header if it’s on the list of domains your app should be running on).

This way, your JS code can simply invoke fetch(..., { credentials: "include", ...}) with no API key at all.