CORS

13 views
Skip to first unread message

Nick

unread,
May 12, 2024, 11:38:31 PMMay 12
to KrakenD Community
Any ideas what is needed to get this message go away?

KRAKEND DEBUG: [CORS] 2024/05/13 03:33:25   Actual request no headers added: missing origin

Albert Lombarte

unread,
May 13, 2024, 4:53:04 AMMay 13
to KrakenD Community, Nick
Hi Nick,

This is a DEBUG message. It is probably showing because requests the request lacks an Origin header (or even because of a difference in HTTP/ HTTPS). But in any case you can make it go away by setting "debug": "false in the security/cors configuration. You can also make go away any debug message in the logger:

{
  "version": 3,
  "extra_config": {
    "telemetry/logging": {
      "level": "INFO",
      "prefix": "[KRAKEND]",
      "syslog": false,
      "stdout": true
    }
  }
}


El dia dilluns, 13 de maig del 2024 a les 5:38:31 UTC+2, Nick va escriure:

Nick

unread,
May 13, 2024, 6:06:09 AMMay 13
to KrakenD Community, Albert Lombarte, Nick
Hi Albert,

Many thanks for your quick reply. I turned on the syslog trying to debug the issue. Turning off the syslog to false does not turn off the error though; I really meant to make the error go away not the log entry.

The error is as follows:
2024-05-13 10:59:24  2024/05/13 - 09:59:24.961 ▶ ERROR [ENDPOINT: /test/:tvalue] invalid status code
2024-05-13 10:59:24 [GIN] 2024/05/13 - 09:59:24 | 500 |     2.79174ms |      172.21.0.1 | GET      "/test/4627843"

Any pointers?

Nick

unread,
May 13, 2024, 7:25:09 PMMay 13
to KrakenD Community, Nick, Albert Lombarte
I had my krakend.json miss configured.
All works well.

Albert Lombarte

unread,
May 14, 2024, 3:15:55 AMMay 14
to KrakenD Community, Nick, Albert Lombarte
Glad to hear!

El dia dimarts, 14 de maig del 2024 a les 1:25:09 UTC+2, Nick va escriure:
Reply all
Reply to author
Forward
0 new messages