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

Added follow_redirect flag in http_client #6343

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hackeramitkumar
Copy link
Contributor

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Fixes : #5941

I have added a follow_redirect flag in http_config struct and its default value have been set to false.
Refrence : https://github.com/prometheus/common/blob/main/config/http_config.go#L287

Verification

Signed-off-by: hackeramitkumar <amit9116260192@gmail.com>
@hackeramitkumar
Copy link
Contributor Author

@yeya24 Please check it if any changes are required then let me know.

cmd.Flag(
"http.config",
"[EXPERIMENTAL] Will decide the followRedirect.",
).Default("false").StringVar(&hc.follow_redirect)
Copy link

Choose a reason for hiding this comment

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

28% of developers fix this issue

typecheck: cannot use &hc.follow_redirect (value of type *bool) as *string value in argument to cmd.Flag("http.config", "[EXPERIMENTAL] Will decide the followRedirect.").Default("false").StringVar


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

@yeya24
Copy link
Contributor

yeya24 commented May 7, 2023

I would like to see a refactoring instead of just adding the follow redirects flag https://cloud-native.slack.com/archives/CL25937SP/p1682101076884299?thread_ts=1682100865.795449&channel=CL25937SP&message_ts=1682101076.884299

@stale
Copy link

stale bot commented Jun 18, 2023

Hello 👋 Looks like there was no activity on this amazing PR for the last 30 days.
Do you mind updating us on the status? Is there anything we can help with? If you plan to still work on it, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next week, this issue will be closed (we can always reopen a PR if you get back to this!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ThanosRuler is missing follow_redirect setting
2 participants