Skip to content

Fix feed URL (duplicated http://)#257

Merged
rochacbruno merged 1 commit intorochacbruno:mainfrom
cuducos:fix-feed-url
Apr 14, 2025
Merged

Fix feed URL (duplicated http://)#257
rochacbruno merged 1 commit intorochacbruno:mainfrom
cuducos:fix-feed-url

Conversation

@cuducos
Copy link
Copy Markdown
Contributor

@cuducos cuducos commented Apr 14, 2025

The logic used to say if the string does not contain https:// or https:// — it should be and instead because full URLs would have one or the other ; )

(Plus minor change to use .starts_with instead of just contains)

@rochacbruno rochacbruno merged commit 4b14084 into rochacbruno:main Apr 14, 2025
3 checks passed

let feed_url = if !config.url.contains("http://") || !config.url.contains("https://") {
let feed_url = if !config.url.starts_with("http://") && !config.url.starts_with("https://") {
format!("http://{}", &config.url)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should we use https:// instead of http:// or choose one of them based on a configuration?

@cuducos cuducos mentioned this pull request May 26, 2025
@cuducos cuducos deleted the fix-feed-url branch May 27, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants