How to add Icon with no re-authorization

Dear friends
I have a logo picture (logo.png) in node red main folder :

~/.node-red/Public

I used a ui_template to show it.
Every thing is OK and it shows in dashboard.
Now the problem is, every timeI reboot, I need to re-authorize to see the picture.
I edit httpStatic from :

/home/pi/.node-red/settings.js

to :

httpStatic: '/home/pi/.node-red/public'

Also add :

public/logo.png

The next time :

/logo.png

And at last :

logo.png

to :

/home/pi/.node-red/node_modules/node-red-dashboard/dist/dashboard.appcache

But none works !
How can I show my picture (logo.png) in my password protected dashboard that don't need re-authorization every time?

You could create an endpoint and serve it (or any file) thru a different URL.

See Here

The logo.png is in my local storage!
Isn't it possible to show it like node-red logo at the left corner with no extra node ?

http://127.0.0.1:1880/red/images/node-red.svg

Yes, but as you have it (node-red / dashboard) secured, its, erm, secured & thus needs security credentials to be accessed! :wink:

Thats why i suggested a workaround - setting up another (unsecured) end point.

You can server the single file if you want (i.e. use a fixed endpoint that only returns the one file)

There may be other solutions but I see no reason for resisting this as a solution?

If you want greater control over things, then perhaps consider ui-builder. you dont get anywhere near the amount of hand holding dashboard gives you - but you can do pretty much anything you want.

How about this way ?

?

What does that have to do with accessing an image on your server on a dashboard?

The weather icons are shown IN the dashboard & thus you would need to log in to see them.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.