HAProxy v2.2.2 Native Response Generator http-request return

Hi, I am having issues getting the http-request return to work in my current cfg file. We are running HAProxy 2.2.2. I place the following command in an http mode frontend and verify the configuration without error:

http-request return status 200 content-type text/plain file /tmp/haproxy/keys.json if { path-i /adfs/discovery/keys }

I get the following error logged:
[ALERT] 003/114218 (21250): parsing [//haproxy.cfg:68] : error detected in frontend ‘’ while parsing ‘http-request return’ rule error opening file : ‘/tmp/haproxy/keys.json’

as a result the HAProxy service does not start as it needs to load this file into memory upon starting the haproxy service.

The account that we use to run haproxy has rwx to ‘/tmp/haproxy/keys.json’.

What am I doing wrong.


The file is only 3k in size

What is the mode/owner of /tmp and /tmp/haproxy?

drwxrwxrwt. 13 root root 1200 Jan 5 14:23 tmp
drwxrwxrwx. 3 n013086 n013086 140 Jan 5 12:43 haproxy