glanceapp / glance

A self-hosted dashboard that puts all your feeds in one place
GNU Affero General Public License v3.0
8.48k stars 295 forks source link

[HELP] request-url-template #73

Closed AlissonSantos95 closed 6 months ago

AlissonSantos95 commented 6 months ago

Hi, i moved from homelab to a VPS but i can't understand how to use the request-url-template option it will always give me some tipe of error like those this way:


- type: reddit
            subreddit: selfhosted
            request-url-template: https://reddit.domain.com.br/

gave me this error : failed parsing config file: no {REQUEST-URL} placeholder specified

this way:


- type: reddit
            subreddit: selfhosted
            request-url-template: https://reddit.domain.com.br/{REQUEST-URL}

gave me this error Get "/https:/www.reddit.com/r/selfhosted/hot.json": stopped after 10 redirects

can you explaying and give-me an exemaple how i should put this?

i'm using a oracle VPS

svilenmarkov commented 6 months ago

Hey,

Are you trying to use the request-url-template option because Reddit is blocking requests from your VPS or is it that you're trying to change the links to the comments so you can link to your own Reddit front-end? The former will require you to set up an HTTP proxy and then point to it:

request-url-template: https://your-proxy.com/{REQUEST-URL}

The latter is done by using the comments-url-template property:

comments-url-template: https://old.reddit.com/{POST-PATH}
AlissonSantos95 commented 6 months ago

Reddit is blocking requests from my VPS, so when i put thisrequest-url-template: https://your-proxy.com/{REQUEST-URL} it give me this error Get "/https:/www.reddit.com/r/selfhosted/hot.json": stopped after 10 redirects

svilenmarkov commented 6 months ago

Which HTTP proxy are you using and can you confirm that it proxies requests successfully from your VPS?

AlissonSantos95 commented 6 months ago

oh i'm using troddit, i need an actuval proxy? i'm confused

svilenmarkov commented 6 months ago

Yes, you would need to have a reverse proxy that isn't blocked by Reddit which sends the requests on behalf of Glance. Assuming your proxy lives on your home network and your home network isn't publicly accessible, you'd also need to have the VPS and your home network connected to the same VPN. Something like cors-anywhere or nginx can work as the reverse proxy.

All of that looks a little something like this:

reddit-proxy

AlissonSantos95 commented 6 months ago

Undertood, i can't host anymore on my house so ok i will go with .rss, thanks