mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 07:09:11 +02:00
Engine modules (keys, context snapshot, docket lifespan, worker CLI, client handles) move intact; SEP-1686 wire modules park in _legacy_wire for adaptation to SEP-2663. Core keeps task=True declaration on tools only and raises at serve time until the tasks extension is registered. Co-Authored-By: Claude <noreply@anthropic.com>
21 lines
526 B
Python
21 lines
526 B
Python
import pytest
|
|
|
|
from fastmcp.settings import Settings
|
|
|
|
|
|
def test_http_host_origin_protection_defaults_to_false():
|
|
assert Settings().http_host_origin_protection is False
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
("value", "expected"),
|
|
[
|
|
("auto", "auto"),
|
|
("true", True),
|
|
("false", False),
|
|
],
|
|
)
|
|
def test_http_host_origin_protection_env_var(value, expected, monkeypatch):
|
|
monkeypatch.setenv("FASTMCP_HTTP_HOST_ORIGIN_PROTECTION", value)
|
|
|
|
assert Settings().http_host_origin_protection == expected
|