mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
No more cookie force dynamic
This commit is contained in:
parent
cdc0dc1509
commit
65b88f786d
@ -2,7 +2,6 @@ import { handleApiRequest } from "@/route-handlers/smart-route-handler";
|
||||
import { getEnvVariable } from "@stackframe/stack-shared/dist/utils/env";
|
||||
import { StackAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
|
||||
import { createNodeHttpServerDuplex } from "@stackframe/stack-shared/dist/utils/node-http";
|
||||
import { cookies } from "next/headers";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { createOidcProvider } from "./idp";
|
||||
|
||||
@ -28,9 +27,6 @@ function getOidcCallbackPromise() {
|
||||
}
|
||||
|
||||
const handler = handleApiRequest(async (req: NextRequest) => {
|
||||
// force dynamic
|
||||
cookies();
|
||||
|
||||
const newUrl = req.url.replace(pathPrefix, "");
|
||||
if (newUrl === req.url) {
|
||||
throw new StackAssertionError("No path prefix found in request URL. Is the pathPrefix correct?", { newUrl, url: req.url, pathPrefix });
|
||||
|
||||
@ -78,7 +78,7 @@ export class StackAdminInterface extends StackServerInterface {
|
||||
async createApiKey(
|
||||
options: ApiKeyCreateCrudRequest,
|
||||
): Promise<ApiKeyCreateCrudResponse> {
|
||||
const response = await this.sendServerRequest(
|
||||
const response = await this.sendAdminRequest(
|
||||
"/internal/api-keys",
|
||||
{
|
||||
method: "POST",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user