I have application running on EC2 behind a Application ELB with all security HTTP headers set at server level. I shutdown the EC2 during non-working hours and turn them back on during working hours.
Our security team scans the application during non-working hours and it is returning as HSTS header not set with response 503. The 503 is being returned by ELB as EC2 is stopped.
We are being asked to add HSTS for all 5XX and 4XX pages. This needs to be handled at ELB. Is there a way to apply custom headers at ELB level? Or can we handle this using any other service?