Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Customized header for authentication #884

Open
1 of 2 tasks
bennyz327 opened this issue Jan 25, 2025 · 1 comment
Open
1 of 2 tasks

Customized header for authentication #884

bennyz327 opened this issue Jan 25, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@bennyz327
Copy link

bennyz327 commented Jan 25, 2025

What do you want to be added?

I know we're not accepting new feature requests right now, but I'd like to know if there's any chance of implementing this feature in the future.

TL;TD
Can I add a customized header to the Source Server request?

Additional context

Right now, in the Navidrome Server Source option, only Navidrome's own authentication message (username+password) can be set.

However, when there is a need for a public connection, a common and consistent solution is usually used, some people use Authentik or Authelia

I chose Cloudflare Tunnels with Service tokens (https://developers.cloudflare.com/cloudflare-one/identity/service-tokens/), Service tokens is good for The advantage of Service tokens for 3rd party service access is that I only need to carry 2 header tokens in the external request, but this requires the application to provide customizable headers and content.

Is this possible in the future?

I searched for similar requests in the past
#569
#16

Is this a server-specific feature? (e.g. Jellyfin only)

  • Yes
  • No
@bennyz327 bennyz327 added the enhancement New feature or request label Jan 25, 2025
@jeffvli
Copy link
Owner

jeffvli commented Jan 25, 2025

Unlikely for me to add unfortunately, since that would require UI changes for somewhat of a niche problem.

This is probably the perfect use case to fork and modify Feishin yourself to create a custom build.

You could add the headers yourself under the ndApiClient (or use the axios interceptors).

const result = await axiosClient.request({
data: body,
headers: {
...headers,
...(token && { 'x-nd-authorization': `Bearer ${token}` }),
},
method: method as Method,
params,
signal,
url: `${baseUrl}/${api}`,
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants