Comments (13)
My main hesitation here is that there's a decent chunk of people who have reverse proxies setup with the /api/
route. I guess that's a bad reason to not change it but if I can avoid having a breaking change I'd prefer that. But maybe it's not possible.
Let's do a poll of sorts, then. If this comment gets 5 thumbs up without a violent reaction I'll change it. Otherwise I'll keep it as it is.
from youtubedl-material.
I was just thinking of that, the main issue is the UI needs to know how to contact the server, and the UI is prebuilt in the image, so environment variables won't help here. But I just thought of another solution: we move the config endpoint to /ytdl_api/config
or something like that. Before the UI does anything, it calls that endpoint and gets back the config and the prefix for all other endpoints.
That way it's basically configurable from the settings menu, and would only require a restart to update.
This should be possible, and would likely not even introduce a delay since we don't do anything until the config is retrieved anyways.
from youtubedl-material.
You're right I missed this part here in the configuration:
location ~/ytdl(.*)$ {
rewrite /ytdl/(.*) / break;
proxy_pass http://example.com:8998;
}
I didn't realize it was possible to route using paths like this. My bad 👍
from youtubedl-material.
@Tzahi12345 how about maybe an environment variable that defaults to /api/ ? That way, people who have a conflicting app like me can change it, while others will keep the default /api/.
I personally have no clue how to implement it, just a thought.
EDIT: I just realized that while my installation is docker, you have other installation methods. Not sure how this would be implemented outside of docker.
from youtubedl-material.
/ytdl_config/
first call to check for which is set:
/ytdl_api/
or /api/
That way you have less semantic redundancy.
from youtubedl-material.
Have you checked out the reverse proxy setup page? You can use nginx or apache2 to channel all requests through your web server, not sure if you're doing this already. You can set a subpath using the appropriate configuration. Some more details on your setup would be helpful for figuring out how to get it working on the subpath.
Since the last update, the frontend url setting isn't actually used anymore. The server just exposes the port specified, and because your subdomain likely points to the same place as the root domain, it send you to the right place.
It would be a nice feature to have, but I'm not sure if there's a way to allow for subpaths without interfering with web servers like nginx or apache2.
from youtubedl-material.
Cool! Glad you got it working.
from youtubedl-material.
Hi, I'd like to point out a problem when reverse forwarding the /api
path using another reverse proxy server traefik. When its dashboard is enabled, it requires that both /api
and /dashboard
be forwarded to its internal service. So it means the /api
could not be forwarded to youtube-dl-material.
traefik
is a popularly used reverse proxy server that handles routing for docker images without manual configuration. It would be great if the wiki also provides instructuion.
from youtubedl-material.
Hey. I encountered the same problem with traefik. It seems that the path for api endpoint is hard-coded via this line. If it could be configured somehow so we can add extra subpath between location origin and /api/
, I think it would solve our issues.
from youtubedl-material.
@qlonik The main issue with that the frontend would be unaware of the new path. The backend would need an API subpath just for the config, and then before any other requests get send out, the frontend would have to retrieve that. Not an impossible solution, but perhaps it would be better to replace /api
with something that won't collide with other apps, like /ytdl_api
. It's a bit ugly and would break a lot of people's reverse proxy setup, but so would the first solution too.
If the reverse proxy workaround works, I'm inclined so say that's the official way to go, but I could definitely be convinced otherwise as traefik isn't some obscure proxy service.
from youtubedl-material.
Anyone have any luck getting this to work in caddy without a base url?
from youtubedl-material.
@qlonik The main issue with that the frontend would be unaware of the new path. The backend would need an API subpath just for the config, and then before any other requests get send out, the frontend would have to retrieve that. Not an impossible solution, but perhaps it would be better to replace
/api
with something that won't collide with other apps, like/ytdl_api
. It's a bit ugly and would break a lot of people's reverse proxy setup, but so would the first solution too.If the reverse proxy workaround works, I'm inclined so say that's the official way to go, but I could definitely be convinced otherwise as traefik isn't some obscure proxy service.
Was this pursued? replacing api with something more specific? I have the main issue as another container (Organizrr) uses /api/ on the main page.
from youtubedl-material.
@Tzahi12345 that should do it. I'd be glad to test your proposed fix. Thanks!
Sidenote: I've seen a couple other people post in the issues about the api, and i'm sure most just implemented a subdomain instead. That works only if the auth module api for organizr is disabled for the subdomain.
from youtubedl-material.
Related Issues (20)
- [BUG] Container will not be able to run properly non-privileged HOT 1
- [FEATURE] Set default max quality in config
- How to reset Users account ?
- [BUG] Content does not refresh when switching between subs using side menu
- [BUG] Scheduling a task hangs application, won't start fully HOT 1
- [FEATURE] Make mounted folders paths configurable using environment variable
- [BUG]
- [BUG] Searching goes on forever HOT 2
- YoutubeDl material doesnt download a subscription. HOT 3
- [BUG] pm2 not declared as dependency
- [BUG] Skipping player responses from android clients HOT 1
- [BUG] Can't add subscriptions. It just loads forever and never adds the channel.
- [BUG] container won't start HOT 8
- [BUG] Video file name too long error
- [BUG] Thumbnails don't load if their path contains a "%" character HOT 1
- I'm looking for the best way to set the codecs for downloads
- [BUG] Cant delete individual notifications
- [BUG] Should install mutagen when program installed (esp. for Docker)
- [FEATURE] Explain execa, delimiters, argument usage better & include some helpful messages when people enter custom args
- [BUG] Memory leak while downloading a big playlist HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtubedl-material.