iTop icon indicating copy to clipboard operation
iTop copied to clipboard

Correctly identify as iTop in cURL requests

Open Hipska opened this issue 1 year ago • 5 comments

Base information

Question Answer
Related to a SourceForge thead / Another PR / Combodo ticket? N/A
Type of change? Enhancement

Objective

Outgoing HTTP requests are identified with "spider" user agent, which can simply be blocked sometimes.

Proposed solution

Use for example iTop/3.2.0 as user agent when doing HTTP requests to other services..

Checklist before requesting a review

  • [x] I have performed a self-review of my code
  • [ ] I have tested all changes I made on an iTop instance
  • [ ] I have added a unit test, otherwise I have explained why I couldn't
  • [x] Is the PR clear and detailed enough so anyone can understand digging in the code?

Hipska avatar Jul 10 '24 08:07 Hipska

Good idea. I don't know if it can have any side effects though?

Molkobain avatar Jul 10 '24 09:07 Molkobain

Well, the adverse. So, if an external API refuses to connect anything else than spider 😉

Hipska avatar Jul 10 '24 09:07 Hipska

Just wondering if there should be a config setting as well to override this, and set a custom user agent string? (Or we can simply wait for the first real use case where it's necessary and would need to imitate a regular browser string for some reason).

jbostoen avatar Jul 13 '24 08:07 jbostoen

I'll raise the question during functional review :)

Molkobain avatar Jul 31 '24 07:07 Molkobain

Accepted during functional review. Will be in next iTop version.

jf-cbd avatar Oct 11 '24 08:10 jf-cbd

So it can be merged?

Hipska avatar Nov 14 '24 13:11 Hipska

Yep, thanks @Hipska for the PR !

jf-cbd avatar Nov 14 '24 14:11 jf-cbd