| Server IP : 13.235.167.51 / Your IP : 216.73.217.116 Web Server : Apache System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64 User : root ( 0) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/control.machinox.in/node_modules/next/dist/server/lib/ |
Upload File : |
{"version":3,"sources":["../../../src/server/lib/server-action-request-meta.ts"],"sourcesContent":["import type { IncomingMessage } from 'http'\nimport type { BaseNextRequest } from '../base-http'\nimport type { NextRequest } from '../web/exports'\nimport { ACTION_HEADER } from '../../client/components/app-router-headers'\n\nexport function getServerActionRequestMetadata(\n req: IncomingMessage | BaseNextRequest | NextRequest\n): {\n actionId: string | null\n isURLEncodedAction: boolean\n isMultipartAction: boolean\n isFetchAction: boolean\n isPossibleServerAction: boolean\n} {\n let actionId: string | null\n let contentType: string | null\n\n if (req.headers instanceof Headers) {\n actionId = req.headers.get(ACTION_HEADER) ?? null\n contentType = req.headers.get('content-type')\n } else {\n actionId = (req.headers[ACTION_HEADER] as string) ?? null\n contentType = req.headers['content-type'] ?? null\n }\n\n // We don't actually support URL encoded actions, and the action handler will bail out if it sees one.\n // But we still want it to flow through to the action handler, to prevent changes in behavior when a regular\n // page component tries to handle a POST.\n const isURLEncodedAction = Boolean(\n req.method === 'POST' && contentType === 'application/x-www-form-urlencoded'\n )\n const isMultipartAction = Boolean(\n req.method === 'POST' && contentType?.startsWith('multipart/form-data')\n )\n const isFetchAction = Boolean(\n actionId !== undefined &&\n typeof actionId === 'string' &&\n req.method === 'POST'\n )\n\n const isPossibleServerAction = Boolean(\n isFetchAction || isURLEncodedAction || isMultipartAction\n )\n\n return {\n actionId,\n isURLEncodedAction,\n isMultipartAction,\n isFetchAction,\n isPossibleServerAction,\n }\n}\n\nexport function getIsPossibleServerAction(\n req: IncomingMessage | BaseNextRequest | NextRequest\n): boolean {\n return getServerActionRequestMetadata(req).isPossibleServerAction\n}\n"],"names":["getIsPossibleServerAction","getServerActionRequestMetadata","req","actionId","contentType","headers","Headers","get","ACTION_HEADER","isURLEncodedAction","Boolean","method","isMultipartAction","startsWith","isFetchAction","undefined","isPossibleServerAction"],"mappings":";;;;;;;;;;;;;;;IAqDgBA,yBAAyB;eAAzBA;;IAhDAC,8BAA8B;eAA9BA;;;kCAFc;AAEvB,SAASA,+BACdC,GAAoD;IAQpD,IAAIC;IACJ,IAAIC;IAEJ,IAAIF,IAAIG,OAAO,YAAYC,SAAS;QAClCH,WAAWD,IAAIG,OAAO,CAACE,GAAG,CAACC,+BAAa,KAAK;QAC7CJ,cAAcF,IAAIG,OAAO,CAACE,GAAG,CAAC;IAChC,OAAO;QACLJ,WAAW,AAACD,IAAIG,OAAO,CAACG,+BAAa,CAAC,IAAe;QACrDJ,cAAcF,IAAIG,OAAO,CAAC,eAAe,IAAI;IAC/C;IAEA,sGAAsG;IACtG,4GAA4G;IAC5G,yCAAyC;IACzC,MAAMI,qBAAqBC,QACzBR,IAAIS,MAAM,KAAK,UAAUP,gBAAgB;IAE3C,MAAMQ,oBAAoBF,QACxBR,IAAIS,MAAM,KAAK,WAAUP,+BAAAA,YAAaS,UAAU,CAAC;IAEnD,MAAMC,gBAAgBJ,QACpBP,aAAaY,aACX,OAAOZ,aAAa,YACpBD,IAAIS,MAAM,KAAK;IAGnB,MAAMK,yBAAyBN,QAC7BI,iBAAiBL,sBAAsBG;IAGzC,OAAO;QACLT;QACAM;QACAG;QACAE;QACAE;IACF;AACF;AAEO,SAAShB,0BACdE,GAAoD;IAEpD,OAAOD,+BAA+BC,KAAKc,sBAAsB;AACnE","ignoreList":[0]}