Proxy with Gatling doesn't consider localhost traffic

Do you get any error?
You using Gatling Recorder? What version of Gatling?

Maybe you have similar issue:

If you want you can use in this case some workaround:
In Gatling Recorder you can convert HAR file to Simulation so you can make all steps on page with selected “Preserve logs” and “Disable cache” and after them “Save all as HAR with content”:

Then in Gatling Recorder:

And wua la: