Skip to content

server: Ignore empty / non-existing Origin headers - #25756

Merged
ggerganov merged 1 commit into
ggml-org:masterfrom
sdroege:server-cors-skip-empty-origin
Jul 16, 2026
Merged

ggerganov merged 1 commit into
ggml-org:masterfrom
sdroege:server-cors-skip-empty-origin

Conversation

@sdroege

@sdroege sdroege commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Overview

Otherwise this gives lots of unnecessary warnings:

  W srv    operator(): (CORS) skip non-localhost origin:

Additional information

I don't know if this is the right fix but at least it keeps the logs readable for me. For reference, I'm running llama-server as follows:

./llama-server --port 8012 --models-max 1 --sleep-idle-seconds 2400 --models-preset ./models.ini --host 0.0.0.0 --webui-mcp-proxy -np 1 --threads 8 --tools get_datetime

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: NO, I just grepped for the error message string

Otherwise this gives lots of unnecessary warnings:

  W srv    operator(): (CORS) skip non-localhost origin:
@sdroege
sdroege requested a review from a team as a code owner July 16, 2026 06:07

@ServeurpersoCom ServeurpersoCom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, removes log spam for clients that don't send an Origin header, no functional change.

@ggerganov
ggerganov merged commit 8ee54c8 into ggml-org:master Jul 16, 2026
1 check passed
satindergrewal pushed a commit to satindergrewal/llama.cpp that referenced this pull request Aug 12, 2026
Otherwise this gives lots of unnecessary warnings:

  W srv    operator(): (CORS) skip non-localhost origin:
zbrad pushed a commit to zbrad/llama.cpp that referenced this pull request Sep 10, 2026
Otherwise this gives lots of unnecessary warnings:

  W srv    operator(): (CORS) skip non-localhost origin:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants