# Code based rate limiting rules in nuxt app

**URL:** <https://answers.netlify.com/t/code-based-rate-limiting-rules-in-nuxt-app/157825>\
**Category:** Support\
**Tags:** nuxt\
**Created:** [November 16, 2025, 11:48am UTC](https://answers.netlify.com/t/code-based-rate-limiting-rules-in-nuxt-app/157825 "2025-11-16T11:48:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Posoroko](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@Posoroko](https://answers.netlify.com/u/Posoroko)\
**Post date:** [November 16, 2025, 11:48am UTC](https://answers.netlify.com/t/code-based-rate-limiting-rules-in-nuxt-app/157825/1 "2025-11-16T11:48:13Z")

</div>

Hi !

I’m trying to set up some code based rate limiting rules in my nuxt app.

I tried this in /server/api/auth/login.post.ts :

```

export const config = {

```
path: "/api/auth/\*",

rateLimit: {

    windowLimit: 60,

    windowSize: 60,

    aggregateBy: \["ip", "domain"\]

}

```

}

```  
but the rule doesnt show up in the deploy logs.  
I suppose it’s because the whole nuxt app is bundled up into one single serverless function in netlify. so endpoints are NOT serverless functions.

How can I achieve this ? Is it even possible ?  
thanks in advance !

project name: https://findstable.netlify.app

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [November 17, 2025, 1:45pm UTC](https://answers.netlify.com/t/code-based-rate-limiting-rules-in-nuxt-app/157825/2 "2025-11-17T13:45:55Z")

</div>

Nuxt needs to add support for it. You can file a feature request on Nuxt repo.
