Next.js Server Actions Configuration

Community

Configure Next.js Server Actions

Authorrylezhou
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides options to configure the behavior of Server Actions in your Next.js application, enhancing security and resource management.

Core Features & Use Cases

  • allowedOrigins: Specify trusted domains to prevent Cross-Site Request Forgery (CSRF) attacks by ensuring Server Actions are invoked only from secure origins.
  • bodySizeLimit: Control the maximum request body size to prevent excessive resource consumption and potential Denial-of-Service (DoS) attacks.
  • Enabling Server Actions: Configure Server Actions for earlier versions of Next.js.
  • Use Case: Securely configure your Next.js application to allow Server Actions to be invoked from a specific proxy domain while also setting a custom limit for request body sizes to optimize performance.

Quick Start

Configure your next.config.js file to set the bodySizeLimit for Server Actions to '2mb'.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Next.js Server Actions Configuration
Download link: https://github.com/rylezhou/arlis/archive/main.zip#next-js-server-actions-configuration

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.