X Frame options not allowing my widget to embed(iframe) in other domains/websites

I tried to solve this using the following approach

after_action :allow_iframe

def embed_widget #my widget code will be here end

private def allow_iframe response.headers.delete “X-Frame-Options” end

``

This is working fine in local machine running on thin server.

But not working in production which is running on nginx server

Any one faced this type of problem before ?? Please help me with this problem.

Thanks.

So what headers are being returned by each of those servers?