Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
README.md203 linesDownload Raw Back to corser
1Corser2=======3 4[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/0.1.0/active.svg)](http://www.repostatus.org/#active)5[![Build Status](https://secure.travis-ci.org/agrueneberg/Corser.png)](http://travis-ci.org/agrueneberg/Corser)6 7A highly configurable, middleware compatible implementation of [CORS](http://www.w3.org/TR/cors/) for [Node.js](http://nodejs.org/).8 9 10Changelog11---------12 13### 2.0.1 (August 16, 2016)14 15* Add workaround for [Chrome 52 sending empty `Access-Control-Request-Headers` header](https://bugs.chromium.org/p/chromium/issues/detail?id=633729).16 17### 2.0.0 (March 22, 2014)18 19* Preflight requests are automatically closed. If there is a need for handling `OPTIONS` requests, check the `endPreflightRequests` option.20* The parameters of the callback function in dynamic origin checking are now `(err, matches)` instead of just `(matches)`.21 22 23Examples24--------25 26### How to use Corser as a middleware in Express27 28See `example/express/` for a working example.29 30    var express, corser, app;31 32    express = require("express");33    corser = require("corser");34 35    app = express();36 37    app.use(corser.create());38 39    app.get("/", function (req, res) {40        res.writeHead(200);41        res.end("Nice weather today, huh?");42    });43 44    app.listen(1337);45 46### How to use Corser as a middleware in Connect47 48See `example/connect/` for a working example.49 50    var connect, corser, app;51 52    connect = require("connect");53    corser = require("corser");54 55    app = connect();56 57    app.use(corser.create());58 59    app.use(function (req, res) {60        res.writeHead(200);61        res.end("Nice weather today, huh?");62    });63 64    app.listen(1337);65 66### How to use Corser with plain `http`67 68    var http, corser, corserRequestListener;69 70    http = require("http");71    corser = require("corser");72 73    // Create Corser request listener.74    corserRequestListener = corser.create();75 76    http.createServer(function (req, res) {77        // Route req and res through the request listener.78        corserRequestListener(req, res, function () {79            res.writeHead(200);80            res.end("Nice weather today, huh?");81        });82    }).listen(1337);83 84 85API86---87 88### Creating a Corser request listener89 90Creating a Corser request listener that generates the appropriate response headers to enable CORS is as simple as:91 92    corser.create()93 94This is the equivalent of setting a response header of `Access-Control-Allow-Origin: *`. If you want to restrict the origins, or allow more sophisticated request or response headers, you have to pass a configuration object to `corser.create`.95 96Corser will automatically end preflight requests for you. A preflight request is a special `OPTIONS` request that the browser sends under certain conditions to negotiate with the server what methods, request headers and response headers are allowed for a CORS request. If you need to use the `OPTIONS` method for other stuff, just set `endPreflightRequests` to `false` and terminate those requests yourself:97 98    var corserRequestListener;99 100    corserRequestListener = corser.create({101        endPreflightRequests: false102    });103 104    corserRequestListener(req, res, function () {105        if (req.method === "OPTIONS") {106            // End CORS preflight request.107            res.writeHead(204);108            res.end();109        } else {110            // Implement other HTTP methods.111        }112    });113 114 115#### Configuration Object116 117A configuration object with the following properties can be passed to `corser.create`.118 119##### `origins`120 121A case-sensitive whitelist of origins. Unless unbound, if the request comes from an origin that is not in this list, it will not be handled by CORS.122 123To allow for dynamic origin checking, a function `(origin, callback)` can be passed instead of an array. `origin` is the Origin header, `callback` is a function `(err, matches)`, where `matches` is a boolean flag that indicates whether the given Origin header matches or not.124 125Default: unbound, i.e. every origin is accepted.126 127##### `methods`128 129An uppercase whitelist of methods. If the request uses a method that is not in this list, it will not be handled by CORS.130 131Setting a value here will overwrite the list of default simple methods. To not lose them, concat the methods you want to add with `corser.simpleMethods`: `corser.simpleMethods.concat(["PUT", "DELETE"])`.132 133Default: simple methods (`GET`, `HEAD`, `POST`).134 135##### `requestHeaders`136 137A case-insensitive whitelist of request headers. If the request uses a request header that is not in this list, it will not be handled by CORS.138 139Setting a value here will overwrite the list of default simple request headers. To not lose them, concat the request headers you want to add with `corser.simpleRequestHeaders`: `corser.simpleRequestHeaders.concat(["Authorization"])`.140 141Default: simple request headers (`Accept`, `Accept-Language`, `Content-Language`, `Content-Type`, `Last-Event-ID`).142 143##### `responseHeaders`144 145A case-insensitive whitelist of response headers. Any response header that is not in this list will be filtered out by the user-agent (the browser).146 147Setting a value here will overwrite the list of default simple response headers. To not lose them, concat the response headers you want to add with `corser.simpleResponseHeaders`: `corser.simpleResponseHeaders.concat(["ETag"])`.148 149Default: simple response headers (`Cache-Control`, `Content-Language`, `Content-Type`, `Expires`, `Last-Modified`, `Pragma`).150 151##### `supportsCredentials`152 153A boolean that indicates if cookie credentials can be transferred as part of a CORS request. Currently, only a few HTML5 elements can benefit from this setting.154 155Default: `false`.156 157##### `maxAge`158 159An integer that indicates the maximum amount of time in seconds that a preflight request is kept in the client-side preflight result cache.160 161Default: not set.162 163##### `endPreflightRequests`164 165A boolean that indicates if CORS preflight requests should be automatically closed.166 167Default: `true`.168 169 170FAQ171---172 173### Ajax call returns `Origin X is not allowed by Access-Control-Allow-Origin`174 175Check if the `Origin` header of your request matches one of the origins provided in the `origins` property of the configuration object. If you didn't set any `origins` property, jump to the next question.176 177 178### Ajax call still returns `Origin X is not allowed by Access-Control-Allow-Origin`179 180Your request might use a non-simple method or one or more non-simple headers. According to the specification, the set of simple methods is `GET`, `HEAD`, and `POST`, and the set of simple request headers is `Accept`, `Accept-Language`, `Content-Language`, `Content-Type`, and `Last-Event-ID`. If your request uses **any** other method or header, you have to explicitly list them in the `methods` or `requestHeaders` property of the configuration object.181 182 183#### Example184 185You want to allow requests that use an `X-Requested-With` header. Pass the following configuration object to `corser.create`:186 187    corser.create({188        requestHeaders: corser.simpleRequestHeaders.concat(["X-Requested-With"])189    });190 191 192### Getting a response header returns `Refused to get unsafe header "X"`193 194Your browser blocks every non-simple response headers that was not explicitly allowed in the preflight request. The set of simple response headers is `Cache-Control`, `Content-Language`, `Content-Type`, `Expires`, `Last-Modified`, `Pragma`. If you want to access **any** other response header, you have to explicitly list them in the `responseHeaders` property of the configuration object.195 196#### Example197 198You want to allow clients to read the `ETag` header of a response. Pass the following configuration object to `corser.create`:199 200    corser.create({201        responseHeaders: corser.simpleResponseHeaders.concat(["ETag"])202    });203 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai