iisnode encountered an error when processing the request.

HRESULT: 0x6d
HTTP status: 500
HTTP subStatus: 1013
HTTP reason: Internal Server Error

You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The last 64k of the output generated by the node.exe process to stderr is shown below:

(node:5784) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
YOU SHALL NOT PASS!! - Before your .env is good to go..
API_DOMAIN: undefined
APP_HOST: undefined

 ERROR  Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.advodan.dk, DNS:advodan.dk

  at Object.checkServerIdentity (tls.js:287:12)
  at TLSSocket.onConnectSecure (_tls_wrap.js:1511:27)
  at TLSSocket.emit (events.js:315:20)
  at TLSSocket.EventEmitter.emit (domain.js:483:12)
  at TLSSocket._finishInit (_tls_wrap.js:936:8)
  at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)

YOU SHALL NOT PASS!! - Before your .env is good to go..
API_DOMAIN: undefined
APP_HOST: undefined

 ERROR  Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.advodan.dk, DNS:advodan.dk

  at Object.checkServerIdentity (tls.js:287:12)
  at TLSSocket.onConnectSecure (_tls_wrap.js:1511:27)
  at TLSSocket.emit (events.js:315:20)
  at TLSSocket.EventEmitter.emit (domain.js:483:12)
  at TLSSocket._finishInit (_tls_wrap.js:936:8)
  at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)

YOU SHALL NOT PASS!! - Before your .env is good to go..
API_DOMAIN: undefined
APP_HOST: undefined

 ERROR  Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.advodan.dk, DNS:advodan.dk

  at Object.checkServerIdentity (tls.js:287:12)
  at TLSSocket.onConnectSecure (_tls_wrap.js:1511:27)
  at TLSSocket.emit (events.js:315:20)
  at TLSSocket.EventEmitter.emit (domain.js:483:12)
  at TLSSocket._finishInit (_tls_wrap.js:936:8)
  at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)

TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Location"]
    at ServerResponse.setHeader (_http_outgoing.js:521:3)
    at setHeadersFromObject (C:\inetpub\7535ad\.app\node_modules\on-headers\index.js:94:16)
    at ServerResponse.setWriteHeadHeaders (C:\inetpub\7535ad\.app\node_modules\on-headers\index.js:122:5)
    at ServerResponse.writeHead (C:\inetpub\7535ad\.app\node_modules\on-headers\index.js:30:36)
    at Object.next (server.js:1:458880)
    at t.context.t.context.redirect (server.js:1:342474)
    at server.js:1:440525
    at server.js:1:436939
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  code: 'ERR_INVALID_CHAR'
} {
  status: 301,
  statusText: 'Moved Permanently',
  headers: {
    'cache-control': 'no-cache',
    pragma: 'no-cache',
    'content-length': '106',
    'content-type': 'application/json; charset=utf-8',
    expires: '-1',
    server: 'Microsoft-IIS/10.0',
    'access-control-allow-origin': '*',
    'set-cookie': [ 'AdSession=b43755a7-2161-4e76-a077-37bd033cafda; path=/' ],
    date: 'Tue, 24 Dec 2024 18:55:20 GMT'
  },
  config: {
    adapter: [Function: httpAdapter],
    transformRequest: { '0': [Function: transformRequest] },
    transformResponse: { '0': [Function: transformResponse] },
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, */*',
      connection: 'keep-alive',
      'accept-encoding': 'gzip, deflate',
      'accept-language': 'da',
      'user-agent': 'Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)',
      'x-original-url': '/nyheder/emne/ans%C3%A6ttel',
      'x-forwarded-for': '37.187.89.104',
      'x-forwarded-proto': 'https'
    },
    method: 'get',
    baseURL: 'http://www.advodan.dk',
    url: 'http://www.advodan.dk/umbraco/api/spa/getdata?url=/nyheder/emne/ansættel&navLevels=2&ssr=1',
    data: undefined
  },
  request: ClientRequest {
    _events: [Object: null prototype] {
      socket: [Function],
      abort: [Function],
      aborted: [Function],
      error: [Function],
      timeout: [Function],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 6,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: true,
      _SNICallback: null,
      servername: 'www.advodan.dk',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 8,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'www.advodan.dk',
      _readableState: [ReadableState],
      readable: false,
      _maxListeners: undefined,
      _writableState: [WritableState],
      writable: false,
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: null,
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(asyncId)]: 76037,
      [Symbol(kHandle)]: null,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 429,
      [Symbol(kBytesWritten)]: 406,
      [Symbol(connect-options)]: [Object]
    },
    connection: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: true,
      _SNICallback: null,
      servername: 'www.advodan.dk',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 8,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'www.advodan.dk',
      _readableState: [ReadableState],
      readable: false,
      _maxListeners: undefined,
      _writableState: [WritableState],
      writable: false,
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: null,
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(asyncId)]: 76037,
      [Symbol(kHandle)]: null,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 429,
      [Symbol(kBytesWritten)]: 406,
      [Symbol(connect-options)]: [Object]
    },
    _header: 'GET /umbraco/api/spa/getdata?url=/nyheder/emne/ansættel&navLevels=2&ssr=1 HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'connection: keep-alive\r\n' +
      'accept-encoding: gzip, deflate\r\n' +
      'accept-language: da\r\n' +
      'user-agent: Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)\r\n' +
      'x-original-url: /nyheder/emne/ans%C3%A6ttel\r\n' +
      'x-forwarded-for: 37.187.89.104\r\n' +
      'x-forwarded-proto: https\r\n' +
      'Host: www.advodan.dk\r\n' +
      '\r\n',
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object],
      requests: {},
      sockets: [Object],
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    insecureHTTPParser: undefined,
    path: '/umbraco/api/spa/getdata?url=/nyheder/emne/ansættel&navLevels=2&ssr=1',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      readable: false,
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      socket: [TLSSocket],
      connection: [TLSSocket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      headers: [Object],
      rawHeaders: [Array],
      trailers: {},
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 301,
      statusMessage: 'Moved Permanently',
      client: [TLSSocket],
      _consuming: false,
      _dumped: false,
      req: [Circular],
      responseUrl: 'https://www.advodan.dk/umbraco/api/spa/getdata?url=/nyheder/emne/ansættel&navLevels=2&ssr=1',
      redirects: [],
      [Symbol(kCapture)]: false
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    _redirectable: Writable {
      _writableState: [WritableState],
      writable: true,
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      _options: [Object],
      _redirectCount: 1,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function],
      _currentRequest: [Circular],
      _currentUrl: 'https://www.advodan.dk/umbraco/api/spa/getdata?url=/nyheder/emne/ansættel&navLevels=2&ssr=1',
      _isRedirect: true,
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      connection: [Array],
      'accept-encoding': [Array],
      'accept-language': [Array],
      'user-agent': [Array],
      'x-original-url': [Array],
      'x-forwarded-for': [Array],
      'x-forwarded-proto': [Array],
      host: [Array]
    }
  },
  data: {
    meta: { code: 301, error: 'Page has moved' },
    data: { url: '/nyheder/emne/ans�ttel/', permanent: true }
  }
}
YOU SHALL NOT PASS!! - Before your .env is good to go..
API_DOMAIN: undefined
APP_HOST: undefined

 ERROR  Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.advodan.dk, DNS:advodan.dk

  at Object.checkServerIdentity (tls.js:287:12)
  at TLSSocket.onConnectSecure (_tls_wrap.js:1511:27)
  at TLSSocket.emit (events.js:315:20)
  at TLSSocket.EventEmitter.emit (domain.js:483:12)
  at TLSSocket._finishInit (_tls_wrap.js:936:8)
  at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)

YOU SHALL NOT PASS!! - Before your .env is good to go..
API_DOMAIN: undefined
APP_HOST: undefined

 ERROR  Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.advodan.dk, DNS:advodan.dk

  at Object.checkServerIdentity (tls.js:287:12)
  at TLSSocket.onConnectSecure (_tls_wrap.js:1511:27)
  at TLSSocket.emit (events.js:315:20)
  at TLSSocket.EventEmitter.emit (domain.js:483:12)
  at TLSSocket._finishInit (_tls_wrap.js:936:8)
  at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)

YOU SHALL NOT PASS!! - Before your .env is good to go..
API_DOMAIN: undefined
APP_HOST: undefined

 ERROR  Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.advodan.dk, DNS:advodan.dk

  at Object.checkServerIdentity (tls.js:287:12)
  at TLSSocket.onConnectSecure (_tls_wrap.js:1511:27)
  at TLSSocket.emit (events.js:315:20)
  at TLSSocket.EventEmitter.emit (domain.js:483:12)
  at TLSSocket._finishInit (_tls_wrap.js:936:8)
  at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)

YOU SHALL NOT PASS!! - Before your .env is good to go..
API_DOMAIN: undefined
APP_HOST: undefined

 ERROR  Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.advodan.dk, DNS:advodan.dk

  at Object.checkServerIdentity (tls.js:287:12)
  at TLSSocket.onConnectSecure (_tls_wrap.js:1511:27)
  at TLSSocket.emit (events.js:315:20)
  at TLSSocket.EventEmitter.emit (domain.js:483:12)
  at TLSSocket._finishInit (_tls_wrap.js:936:8)
  at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)

YOU SHALL NOT PASS!! - Before your .env is good to go..
API_DOMAIN: undefined
APP_HOST: undefined

 ERROR  Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.advodan.dk, DNS:advodan.dk

  at Object.checkServerIdentity (tls.js:287:12)
  at TLSSocket.onConnectSecure (_tls_wrap.js:1511:27)
  at TLSSocket.emit (events.js:315:20)
  at TLSSocket.EventEmitter.emit (domain.js:483:12)
  at TLSSocket._finishInit (_tls_wrap.js:936:8)
  at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)