Fork me on GitHub
#yada
<
2016-07-28
>
lmergen09:07:48

right, so, i finally figured out why this is...

lmergen09:07:03

apparently, it only adds these headers when it's using either SSL or X-Forwarded-For

lmergen09:07:09

i think the assumption is being made that when an X-Forwarded-For header is set, it's https and being terminated at the proxy, but i think this is wrong

dominicm09:07:56

Is there a way to know that you're behind a proxy AND using ssl?

lmergen09:07:47

no, but it seems wrong to me to assume you're behind SSL when you're behind a proxy

lmergen09:07:55

this should be a configuration parameter, imho

dominicm10:07:24

Oh, it is wrong (under the premise is that these headers should only be on for SSL)

dominicm10:07:46

Yada tries to be smart though. This behaviour is part of the design.

dominicm10:07:01

It's supposed to encourage HTTP spec compliance as automatically as possible.

malcolmsparks10:07:19

I think it should be configurable. I was going to mention that the interceptor that adds these headers can be replaced - see yada.interceptors for some convenience fns that demonstrate how

malcolmsparks10:07:10

The interceptor involved is a bit of a first-draft

dominicm10:07:29

Does this mean that a resource will need to know if it's behind SSL or not?

lmergen11:07:42

that makes sense, that's part of your infrastructure configuration, not your service configuration

lmergen11:07:09

this is just an issue with the http protocol not having any support for this

lmergen11:07:53

the problem right now is that Content-Security-Policy basically cripples your website if it's served over http