Skip to content

Commit f475e65

Browse files
authored
Merge pull request lightspeed-core#409 from tisnik/lcore-405-docs
LCORE-405: docs
2 parents b95da9e + 2c44859 commit f475e65

1 file changed

Lines changed: 74 additions & 28 deletions

File tree

README.md

Lines changed: 74 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,49 @@ The service includes comprehensive user data collection capabilities for various
1515

1616
<!-- vim-markdown-toc GFM -->
1717

18-
* [lightspeed-stack](#lightspeed-stack)
19-
* [About The Project](#about-the-project)
2018
* [Architecture](#architecture)
2119
* [Prerequisites](#prerequisites)
2220
* [Installation](#installation)
2321
* [Configuration](#configuration)
24-
* [Integration with Llama Stack](#integration-with-llama-stack)
25-
* [Llama Stack as separate server](#llama-stack-as-separate-server)
26-
* [Llama Stack project and configuration](#llama-stack-project-and-configuration)
27-
* [Check connection to Llama Stack](#check-connection-to-llama-stack)
28-
* [Llama Stack as client library](#llama-stack-as-client-library)
29-
* [System prompt](#system-prompt)
30-
* [Safety Shields](#safety-shields)
31-
* [Authentication](#authentication)
32-
* [K8s based authentication](#k8s-based-authentication)
33-
* [JSON Web Keyset based authentication](#json-web-keyset-based-authentication)
34-
* [No-op authentication](#no-op-authentication)
22+
* [Integration with Llama Stack](#integration-with-llama-stack)
23+
* [Llama Stack as separate server](#llama-stack-as-separate-server)
24+
* [MCP Server and Tool Configuration](#mcp-server-and-tool-configuration)
25+
* [Configuring MCP Servers](#configuring-mcp-servers)
26+
* [Configuring MCP Headers](#configuring-mcp-headers)
27+
* [Llama Stack project and configuration](#llama-stack-project-and-configuration)
28+
* [Check connection to Llama Stack](#check-connection-to-llama-stack)
29+
* [Llama Stack as client library](#llama-stack-as-client-library)
30+
* [User data collection](#user-data-collection)
31+
* [System prompt](#system-prompt)
32+
* [Safety Shields](#safety-shields)
33+
* [Authentication](#authentication)
34+
* [K8s based authentication](#k8s-based-authentication)
35+
* [JSON Web Keyset based authentication](#json-web-keyset-based-authentication)
36+
* [No-op authentication](#no-op-authentication)
3537
* [Usage](#usage)
36-
* [Make targets](#make-targets)
37-
* [Running Linux container image](#running-linux-container-image)
38+
* [Make targets](#make-targets)
39+
* [Running Linux container image](#running-linux-container-image)
3840
* [Endpoints](#endpoints)
39-
* [OpenAPI specification](#openapi-specification)
40-
* [Readiness Endpoint](#readiness-endpoint)
41-
* [Liveness Endpoint](#liveness-endpoint)
41+
* [OpenAPI specification](#openapi-specification)
42+
* [Readiness Endpoint](#readiness-endpoint)
43+
* [Liveness Endpoint](#liveness-endpoint)
4244
* [Publish the service as Python package on PyPI](#publish-the-service-as-python-package-on-pypi)
43-
* [Generate distribution archives to be uploaded into Python registry](#generate-distribution-archives-to-be-uploaded-into-python-registry)
44-
* [Upload distribution archives into selected Python registry](#upload-distribution-archives-into-selected-python-registry)
45-
* [Packages on PyPI and Test PyPI](#packages-on-pypi-and-test-pypi)
45+
* [Generate distribution archives to be uploaded into Python registry](#generate-distribution-archives-to-be-uploaded-into-python-registry)
46+
* [Upload distribution archives into selected Python registry](#upload-distribution-archives-into-selected-python-registry)
47+
* [Packages on PyPI and Test PyPI](#packages-on-pypi-and-test-pypi)
4648
* [Contributing](#contributing)
4749
* [Testing](#testing)
4850
* [License](#license)
4951
* [Additional tools](#additional-tools)
50-
* [Utility to generate OpenAPI schema](#utility-to-generate-openapi-schema)
51-
* [Path](#path)
52-
* [Usage](#usage-1)
53-
* [Project structure](#project-structure)
54-
* [Configuration classes](#configuration-classes)
55-
* [REST API](#rest-api)
52+
* [Utility to generate OpenAPI schema](#utility-to-generate-openapi-schema)
53+
* [Path](#path)
54+
* [Usage](#usage-1)
5655
* [Data Export Integration](#data-export-integration)
57-
56+
* [Quick Integration](#quick-integration)
57+
* [Documentation](#documentation)
58+
* [Project structure](#project-structure)
59+
* [Configuration classes](#configuration-classes)
60+
* [REST API](#rest-api)
5861

5962
<!-- vim-markdown-toc -->
6063

@@ -400,6 +403,49 @@ authentication:
400403
module: "noop-with-token"
401404
```
402405

406+
## CORS
407+
408+
It is possible to configure CORS handling. This configuration is part of service configuration:
409+
410+
```yaml
411+
service:
412+
host: localhost
413+
port: 8080
414+
auth_enabled: false
415+
workers: 1
416+
color_log: true
417+
access_log: true
418+
cors:
419+
allow_origins:
420+
- http://foo.bar.baz
421+
- http://test.com
422+
allow_credentials: true
423+
allow_methods:
424+
- *
425+
allow_headers:
426+
- *
427+
```
428+
429+
### Default values
430+
431+
```yaml
432+
cors:
433+
allow_origins:
434+
- *
435+
allow_credentials: false
436+
allow_methods:
437+
- *
438+
allow_headers:
439+
- *
440+
```
441+
442+
## Allow credentials
443+
444+
Credentials are not allowed with wildcard origins per CORS/Fetch spec.
445+
See https://fastapi.tiangolo.com/tutorial/cors/
446+
447+
448+
403449
# Usage
404450

405451
```

0 commit comments

Comments
 (0)