Skip to content

armgit / janas

Public Imported from GitHub
0

37 tok/s from Qwen3-Next-80B (48 GB) on a 32 GB laptop, 24 without drafts vs 2.8 for llama.cpp; reading 62 vs 16 tok/s. Faster than llama.cpp on all 13 models compared in Q4_K_M. LLMs bigger than your RAM, pure C, CPU or GPU.

705 B
Raw Blame
/* SPDX-License-Identifier: GPL-3.0-or-later
   Copyright (C) 2026 Maurizio Cammalleri */
/*
 * origin.h - which web pages may call the server (origin.c).
 */
#ifndef JANAS_SERVER_ORIGIN_H
#define JANAS_SERVER_ORIGIN_H

#include "server.h"

enum {
    SRV_ORIGIN_REFUSED, /* a page of another site */
    SRV_ORIGIN_NONE,    /* no Origin: a program, not a page */
    SRV_ORIGIN_SAME,    /* the server's own page (/test) */
    SRV_ORIGIN_LISTED   /* named with --allow-origin: answered with CORS */
};

/* What a request with these Origin and Host headers (either may be NULL)
   is. */
int srv_origin_check(const struct srv_config *c, const char *origin,
                     const char *host);

#endif