uibee 2.16.25 → 2.16.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
2
2
  @layer properties;
3
3
  @layer theme, base, components, utilities;
4
4
  @layer theme {
@@ -1,5 +1,6 @@
1
1
  export function getDomain(req) {
2
- const proto = req.headers.get('x-forwarded-proto') ?? new URL(req.url).protocol.replace(':', '');
3
- const host = req.headers.get('x-forwarded-host') ?? req.headers.get('host') ?? new URL(req.url).host;
2
+ const clientProto = req.headers.get('x-forwarded-proto');
3
+ const proto = clientProto ?? new URL(req.url).protocol.replace(':', '');
4
+ const host = req.headers.get('host') ?? req.headers.get('x-forwarded-host') ?? new URL(req.url).host;
4
5
  return `${proto}://${host}`;
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uibee",
3
- "version": "2.16.25",
3
+ "version": "2.16.26",
4
4
  "description": "Shared components, functions and hooks for reuse across Login projects",
5
5
  "homepage": "https://github.com/Login-Linjeforening-for-IT/uibee#readme",
6
6
  "bugs": {
@@ -1,7 +1,9 @@
1
1
  import { NextRequest } from 'next/server'
2
2
 
3
3
  export function getDomain(req: NextRequest): string {
4
- const proto = req.headers.get('x-forwarded-proto') ?? new URL(req.url).protocol.replace(':', '')
5
- const host = req.headers.get('x-forwarded-host') ?? req.headers.get('host') ?? new URL(req.url).host
4
+ const clientProto = req.headers.get('x-forwarded-proto')
5
+ const proto = clientProto ?? new URL(req.url).protocol.replace(':', '')
6
+ const host = req.headers.get('host') ?? req.headers.get('x-forwarded-host') ?? new URL(req.url).host
7
+
6
8
  return `${proto}://${host}`
7
9
  }