mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-15 22:02:12 +08:00
Enhancement: allow api auth with moonraker service (#2934)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
@@ -12,3 +12,12 @@ widget:
|
|||||||
type: moonraker
|
type: moonraker
|
||||||
url: http://moonraker.host.or.ip:port
|
url: http://moonraker.host.or.ip:port
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your moonraker instance has an active authorization and your homepage ip isn't whitelisted you need to add your api key ([Authorization Documentation](https://moonraker.readthedocs.io/en/latest/web_api/#authorization)).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
widget:
|
||||||
|
type: moonraker
|
||||||
|
url: http://moonraker.host.or.ip:port
|
||||||
|
key: api_keymoonraker
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import genericProxyHandler from "utils/proxy/handlers/generic";
|
import credentialedProxyHandler from "utils/proxy/handlers/credentialed";
|
||||||
|
|
||||||
const widget = {
|
const widget = {
|
||||||
api: "{url}/printer/objects/query?{endpoint}",
|
api: "{url}/printer/objects/query?{endpoint}",
|
||||||
proxyHandler: genericProxyHandler,
|
proxyHandler: credentialedProxyHandler,
|
||||||
|
|
||||||
mappings: {
|
mappings: {
|
||||||
print_stats: {
|
print_stats: {
|
||||||
|
|||||||
Reference in New Issue
Block a user