Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add WebUI API token authorization #4197

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

mintyleaf
Copy link
Contributor

Description

This PR fixes #2227 (tracked in #2156)
I've added a simple (we can't use fancy template resources without auth) html login page for token input, which pushes xhr request to the new /# handler, which is sets a 24hr valid cookie for a token.
The v2keyauth is now looking for token field in cookies too.

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Copy link

netlify bot commented Nov 18, 2024

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 7e66ec8
🔍 Latest deploy log https://app.netlify.com/sites/localai/deploys/673cb2f7dd29f20008556b92
😎 Deploy Preview https://deploy-preview-4197--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mudler
Copy link
Owner

mudler commented Nov 19, 2024

This is looking nice, thank you! just few small nits

@mudler mudler changed the title Add WebUI API token authorization feat: add WebUI API token authorization Nov 19, 2024
Copy link
Owner

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, thanks!

@mudler mudler enabled auto-merge (squash) November 19, 2024 16:59
@mudler mudler added enhancement New feature or request ux labels Nov 19, 2024
@mudler mudler disabled auto-merge November 19, 2024 17:42
@mudler mudler merged commit de148cb into mudler:master Nov 19, 2024
29 of 30 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebUI: 'Authorization header missing'
2 participants