GithubHelp home page GithubHelp logo

Currently, the server code snippet is used to determine the user agent to jump to. Strangely, it did not take effect. about ingress-nginx HOT 10 CLOSED

shaojielinux avatar shaojielinux commented on September 25, 2024
Currently, the server code snippet is used to determine the user agent to jump to. Strangely, it did not take effect.

from ingress-nginx.

Comments (10)

k8s-ci-robot avatar k8s-ci-robot commented on September 25, 2024

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from ingress-nginx.

longwuyuan avatar longwuyuan commented on September 25, 2024

/remove-kind bug

/triage needs-information
/kind support

from ingress-nginx.

shaojielinux avatar shaojielinux commented on September 25, 2024

/remove-kind bug

/triage needs-information /kind support

The logic of the if condition fails

from ingress-nginx.

longwuyuan avatar longwuyuan commented on September 25, 2024
  • ok thanks for confirming that the logic fails
  • This project wrote the snippet annotation so you can ask here if annotation is broken
  • The logic of the if condition is a nginx feature so you are better off if you discuss in nginx forums instead of here
  • Wait and see if anyone else has useful comments about that logic
  • I already commented that I saw the if condition looks for string so you should debug for the match of the regex and look at the actual header name and actual header value
  • Here is a example of similar question https://serverfault.com/questions/865055/nginx-redirect-if-user-agent-contains-xyz
  • Just letting you know that reporting here is not a problem but this problem is not related to the ingress controller but its related to the nginx component

from ingress-nginx.

shaojielinux avatar shaojielinux commented on September 25, 2024

I have tried various methods to modify the logic of the if condition, but there has been no change. Currently, I suspect that this code has not taken effect

from ingress-nginx.

longwuyuan avatar longwuyuan commented on September 25, 2024
  • First set a random variable like var_test0
  • Set its value to random value "randval0"
  • Print the var in the logs
  • This will confirm that snippet is working
  • Now once you are sure that snippet is working, change the logic like below
    • if $http_user_agent contains the string curl then print agentcurl
    • This will prove that if works
  • After this add your logic to set a var based on value of $http_user_agent
  • I already showed you a example from stackoverflow where the regex work is more sensible and mature but I do not see any of your comments considering the sensibility, maturity and valid relevance of that example

There are not many resources for doing support on issues that are not in the controller code. So thank you for clarification on what the issue is, but don't have high hopes of discussions here. There are more chances that you can get response to your if condition in slack where there are many many developers and experts

from ingress-nginx.

strongjz avatar strongjz commented on September 25, 2024

Can you output the full nginx.conf?

from ingress-nginx.

github-actions avatar github-actions commented on September 25, 2024

This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev on Kubernetes Slack.

from ingress-nginx.

longwuyuan avatar longwuyuan commented on September 25, 2024

Please re-open the issue when you are reafy to re-engage and move forwardl. For now I will close the issue because there is no tracktion for over a month and the number of open issues are piling up

/close

from ingress-nginx.

k8s-ci-robot avatar k8s-ci-robot commented on September 25, 2024

@longwuyuan: Closing this issue.

In response to this:

Please re-open the issue when you are reafy to re-engage and move forwardl. For now I will close the issue because there is no tracktion for over a month and the number of open issues are piling up

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from ingress-nginx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.