i added CORS header to httpserver.pm
$resp->header('Server' => "pve-api-daemon/3.0");
+$resp->header('Access-Control-Allow-Origin' => "*");
+$resp->header('Access-Control-Allow-Methods' => "GET, POST, OPTIONS");
+$resp->header('Access-Control-Allow-Headers' =>...
Hello, i trying use json api from javascript. I use another domain, and browser send OPTIONS request to node. Node API not have "Access-Control-Allow-Origin" header in reply.
Result - 501 method 'OPTIONS' not available
What i may use api from js?
normally. i trying another path: use standart noVNC package, and prox api.
JS open new window at this url:
but have error "Server disconnected (code: 1006)"
i trying root user, has no effect..
Permissions "api" user: http://joxi.ru/8ZrJyDNTQko7Aj.jpg
if i change username or password to invalid, i see "Login to Proxmox Host failed.". Its worked.
now its ok, i trying change hostname, return to "nodename" back. Now gui worked normaly.
vnc.php page (with iframe) work only if login this user to proxmox gui at this browser..
i trying 'root', PAM user 'api' defined PVEVMAdmin or PVEVMUser permissions..
Now i have problem - Failed to connect to server (code: 1006)
From ProxMox GUI too..
Need restart proxmox?
Thanks for reply! I use class at your link, added into fucntion "setCookie" from your post and call this function after use login(), /vncproxy & /vncwebsocket API.
Have error at my screenshot, 401 - no ticket..
I have ticket with API reply, in array. Maybe, i need use it?
Now i trying this:
as...
No worked this method at proxmox 3.4Error "No Ticket 401" (screenshot http://joxi.ru/BLmGDx8tBZgQ2l.jpg) in frame. At proxmox webgui started console task. If after this return to your script at this browser, all ok.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.