diff --git a/Setting-up-Authentication.md b/Setting-up-Authentication.md index ceb0f55..27080af 100644 --- a/Setting-up-Authentication.md +++ b/Setting-up-Authentication.md @@ -206,11 +206,11 @@ curl -X 'GET' \ > This method is mostly useful when testing API requests from the browser devtools or CLI tools, as it lets you skip having to pass an API key with every request. > Browsers enforce that requests made to the ArchiveBox API from *other domains* will not include any session cookies by default. This is is an [important security principle](https://docs.djangoproject.com/en/5.0/ref/csrf/) that protects you from API requests being initiated from JS served to users on websites you don't control (aka CSRF/CORS attacks). +> +> To allow incoming POST requests from other domains **that you trust**, you must add them to the [`CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/5.0/ref/settings/#csrf-trusted-origins) config option in the `archivebox/core/settings.py` source code on your machine ([open an issue](https://github.com/ArchiveBox/ArchiveBox/issues/new/choose) and explain your use-case if you want us to expose this as normal configuration option). Log in via the Admin Web UI: `/admin/login/`, you can then re-use your login session id (stored in the `sessionid` cookie) for REST API requests. By default, this only allows you to make requests from the same domain ArchiveBox is being served on (e.g. from browser devtools open on an ArchiveBox page). -To allow incoming POST requests from other domains **that you trust**, you must add them to the [`CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/5.0/ref/settings/#csrf-trusted-origins) config option in the `archivebox/core/settings.py` source code on your machine ([open an issue](https://github.com/ArchiveBox/ArchiveBox/issues/new/choose) and explain your use-case if you want us to expose this as normal configuration option). - ```bash curl -X 'GET' \ 'http://127.0.0.1:8000/api/v1/core/snapshots?limit=10' \