Commit Graph

50 Commits

Author SHA1 Message Date
Deluan 673880d661 Add option to load TLS cert/key, and use HTTPS 2023-03-17 16:32:13 -04:00
Deluan 10108c63c9 Allow BaseURL to contain full server url, including scheme and host. Fix #2183 2023-02-15 21:13:38 -05:00
Deluan ab04e33da6 Initial work on Shares 2023-01-24 18:36:45 -05:00
Deluan 69e0a266f4 Remove size from public image ID JWT 2023-01-13 22:18:34 -05:00
Deluan 387acc5f63 Add public endpoint to expose images 2023-01-13 22:18:34 -05:00
Deluan 6260927074 Serve artist placeholder directly, instead of using LastFM's CDN 2022-12-30 20:14:03 -05:00
Deluan 1b5f855bff Compress more http content-types.
Also, some minor refactoring
2022-11-26 13:13:05 -05:00
Deluan cd41d9a419 Shutdown gracefully, close DB connection 2022-11-21 12:28:09 -05:00
Kendall Garner 751e42c705
Fix creating server (#1894) 2022-09-27 16:53:40 -04:00
Deluan 2a3cd08f20 Fix GO-S2114 security issue
See https://deepsource.io/directory/analyzers/go/issues/GO-S2114
2022-09-26 22:33:42 -04:00
Brice Johnson 6d947f6f7e
Allowing 3rd party UIs to access `x-total-count` http header (#1470)
* Adding 'x-content-duratin' and 'x-total-count' to CORS exposed headers

* Moving cors setup to middlewares.go

* adding x-nd-authorization to exposed headers
2021-11-19 10:07:54 -05:00
Deluan 804fb716db Show in the logs how long it took to startup 2021-11-04 13:49:05 -04:00
Deluan 7540881695 Small refactorings 2021-07-20 19:18:29 -04:00
Deluan 502a719e96 Implement Last.FM Desktop Auth flow endpoints 2021-06-21 18:14:01 -04:00
Steve Richter 8ee5c1f245 Initial Last.fm UI implementation 2021-06-21 18:14:01 -04:00
Deluan 521d1ff2bf Disable `realip` middleware when using the reverse proxy authentication feature
Should fix https://github.com/navidrome/navidrome/pull/1152#issuecomment-862306847
2021-06-16 10:01:09 -04:00
Deluan b65e76293a Only send events to clients who need it
- User events (star, rating, plays) only sent to same user
- Don't send to the client (browser window) that originated the event
2021-06-15 18:59:26 -04:00
Deluan d54129ecd2 Rename `app` package to `nativeapi` 2021-06-13 19:15:41 -04:00
Deluan Quintão 03efc48137
Refactor routing, changes API URLs (#1171)
* Make authentication part of the server, so it can be reused outside the Native API

This commit has broken tests after a rebase

* Serve frontend assets from `server`, and not from Native API

* Change Native API URL

* Fix auth tests

* Refactor server authentication

* Simplify authProvider, now subsonic token+salt comes from the server

* Don't send JWT token to UI when authenticated via Request Header

* Enable ReverseProxyWhitelist to be read from environment
2021-06-13 12:46:36 -04:00
Deluan 86d3a219a9 Show name of router in log 2021-05-24 11:55:39 -04:00
Deluan 7d96167abc Upgrade to go-chi 5 2021-05-11 17:21:18 -04:00
Deluan 3b0defefec Fix UI loading redirections. Should fix #906 2021-03-29 20:13:04 -04:00
Josep Mª Domingo 515aa7108b
Move logger middleware to capture routing errors (ex: 405). (#877)
* Fix #836

* Remove requestLogger middleware from MountRouter
2021-03-24 23:17:36 -04:00
Deluan Quintão 2d528bbc87
Remove dependency of go-bindata (#818)
* Use new embed functionality for serving UI assets

* Use new embed functionality for serving resources. Remove dependency on go-bindata

* Remove Go 1.15
2021-03-12 11:06:51 -05:00
Deluan 6ee45a9ccc Move project to Navidrome GitHub organization 2021-02-06 21:46:35 -05:00
Deluan c0ec0b28b9 Add better process lifecycle management 2020-10-24 22:43:59 -04:00
Deluan 6dc21d0595 Check for Last.FM and Spotify configuration at startup 2020-10-21 17:10:06 -04:00
Deluan fea5d23fc7 Add `ffmpeg` detection at start-up 2020-10-06 17:24:16 -04:00
Deluan cd171c40cb Add `secure` middleware, with sensible values 2020-10-06 08:46:58 -04:00
Deluan 8dfc259857 Serve `robots.txt` from root (http://server/robots.txt) 2020-10-02 10:15:19 -04:00
Deluan 15a06fcd27 Removed support for Jamstash in dev mode. Not needed anymore :) 2020-08-15 23:11:31 -04:00
Deluan d2e4cade62 Change duration config types 2020-07-02 17:53:51 -04:00
Dimitri Herzog f1e1d3bc07 request throttling only for media group api 2020-04-21 08:39:14 -04:00
Deluan 694be54428 Replace math.Max with utils.MaxInt 2020-04-20 12:17:01 -04:00
Dimitri Herzog 716f4c5cf7 configuration for request throttling 2020-04-20 11:51:00 -04:00
Deluan d81bf8a518 Update github.com/go-chi/cors 2020-04-13 10:50:18 -04:00
Deluan 3b6d0b3d15 Add a catchall route to redirect everything to app/index.html 2020-04-03 19:45:35 -04:00
Deluan 75cd21da1f Add BaseURL configuration (fixes #103) 2020-04-03 19:05:38 -04:00
Deluan e23a290812 fix: logging of scanner startup 2020-03-21 14:20:22 -04:00
Deluan e5e35516d7 fix: initialize mimetypes for tests 2020-02-04 20:44:54 -05:00
Deluan 0d64fb05c7 feat: disable scanner if ScanInterval is set to 0 2020-02-03 11:58:21 -05:00
Deluan 203754726b refactor: better request logging 2020-02-01 20:07:15 -05:00
Deluan 8756f55650 Add git info to version 2020-01-25 11:06:04 -05:00
Deluan bff6f3a4bd Rename env vars prefix to ND_ 2020-01-24 01:29:31 -05:00
Deluan bee55c04c8 Rename project to Navidrome 2020-01-23 19:44:08 -05:00
Deluan 182c0b5d5e Add configuration for scan interval. Default 5 mins 2020-01-22 08:48:02 -05:00
Deluan 28cd3ec3e4 Fix startup order, setting LogLevel 2020-01-20 17:35:04 -05:00
Deluan 9e5ffaaff4 Created InitialSetup method that handles all steps required for starting the server for the first time 2020-01-20 15:17:43 -05:00
Deluan 3a03284c59 Add routing for basic web ui 2020-01-19 19:35:03 -05:00
Deluan 5bc1551b09 Clean up 2020-01-19 18:28:23 -05:00
Renamed from server/app.go (Browse further)