Disable "defaults" section

from this page: https://www.haproxy.com/documentation/hapee/latest/configuration/config-sections/defaults/

If a frontend, backend, or listen section does not indicate a named defaults section using the from keyword, it takes the default values specified in the nearest preceding defaults section.

^ The way this reads - “defaults” section use is forced.
What if I don’t want to use the “defaults” section for some frontend section? is there a way to disable this inheritance?

Not directly I think, but you can use multiple defaults section as they only affect sections that come after:

For example:

global
 maxconn 1000


defaults
 mode http
 option httplog

frontend http
 ...
frontend https
 ...
backend http_app1
 ...
backend http_app2
 ...

defaults
 mode tcp
 option tcplog

frontend fe_tcp
 ...
backend be_tcp
 ...