🐛 Issue with middleware redirect in docker

This commit is contained in:
Meier Lukas
2023-08-24 21:37:39 +02:00
parent 8adb05100b
commit cdd710455f
3 changed files with 10 additions and 5 deletions

6
src/tools/server/url.ts Normal file
View File

@@ -0,0 +1,6 @@
import { NextRequest } from 'next/server';
export const getUrl = (req: NextRequest) => {
const protocol = req.nextUrl.protocol;
return protocol + '//' + req.headers.get('host');
};