Correctly identify as iTop in cURL requests
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?
Good idea. I don't know if it can have any side effects though?
Well, the adverse. So, if an external API refuses to connect anything else than spider 😉
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).
I'll raise the question during functional review :)
Accepted during functional review. Will be in next iTop version.
So it can be merged?
Yep, thanks @Hipska for the PR !