• Resolved !Benni

    (@benniledl)


    Hi, this is a feature request.

    I am currently making a new website for our company and I wanted to measure its performance with your plugin. The domain is currently still pointing towards the old hosting server with the old site and we are working on the new website by pointing the domain to the new ip-address locally via the hosts file. To measure the site’s performance I would need to be able to set the IP-Address for the HTTP Request.

    Thanks for considering this request.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author nintechnet

    (@nintechnet)

    It’s on our todo list, but I’m not sure yet how that can be implemented. The profiler connects to the remote site using the WordPress API, and I don’t know if we can change the IP or if we need to write on own functions rather than relying on the WP API.
    In the meantime, if you have root access to the new server, you can add the domain and new IP to the new server’s host file too so that when running Code Profiler on the new server, it won’t connect to the old one.

    Thread Starter !Benni

    (@benniledl)

    Thanks for the info, I sadly do not have root access but thank you for the tip and thank your for making this totally awesome plugin!

    Plugin Author nintechnet

    (@nintechnet)

    In the next release, there will be a “Custom HTTP headers” field in the “Advanced Options” section where the user can configure the profiler to send some specific HTTP headers. I made some tests and noticed that it could be used to solve your problem easily:
    Assuming the domain is “example.com”, the page to profile https://example.com/foo/ and the new server IP address 1.2.3.4, all you will have to do is to enter https://1.2.3.4/foo/ in the Custom URL field and, in the new “Custom HTTP headers” field, “Host: example.com”. The profiler will connect to 1.2.3.4 and request the /foo/ page from the “example.com domain.

    Thread Starter !Benni

    (@benniledl)

    Thank you very much! I will try this out

    Thread Starter !Benni

    (@benniledl)

    Would it be possible for you to share the patch early via an alternate download link?

    Plugin Author nintechnet

    (@nintechnet)

    Version 1.6.4 was released today.

    Thread Starter !Benni

    (@benniledl)

    Works perfect thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Set IP for HTTP request’ is closed to new replies.