From 23f86fcd514a707a6821296cdcdf50ddb7dee8e8 Mon Sep 17 00:00:00 2001 From: Werner Beroux Date: Sat, 1 Jul 2017 00:57:21 +0200 Subject: [PATCH] Updated WebUI API Documentation (markdown) --- WebUI-API-Documentation.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WebUI-API-Documentation.md b/WebUI-API-Documentation.md index 6cdfd9a..6bbaf84 100644 --- a/WebUI-API-Documentation.md +++ b/WebUI-API-Documentation.md @@ -103,7 +103,7 @@ You must supply the cookie whenever you want to perform an operation that requir Example showing how to login and execute a command that requires authentication using `curl`: ```sh -$ curl -i --data "username=admin&password=admin" http://localhost:8080/login +$ curl -i --header 'Referer: http://localhost:8080' --data 'username=admin&password=adminadmin' http://localhost:8080/login HTTP/1.1 200 OK Content-Encoding: Content-Length: 3 @@ -112,6 +112,8 @@ Set-Cookie: SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ; path=/ $ curl http://localhost:8080/query/torrents --cookie "SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ" ``` +Note: Set `Referer` or `Origin` header to the exact same domain and port as used in the HTTP query `Host` header. + ### Logout ### ```http