简体   繁体   中英

rails 3.1 iframe issue

I am trying to open an iframe in my application and its not loading, its giving me a error message like WARNING: Can't verify CSRF token authenticity and logging me out. Cam any one suggest as to what could be the workaround. Thahnks.

This link ( Iframe causes Can't Verify CSRF Token Authenticity n Rails ) does not answer my question, I have the p3p gem installed my iframe loads correctly, but there is any request that is happening in iframe that time niether p3p headers nor csrf token are sent

Here is how i call my iframe

< iframe name="frmane" id="batch_grid_frame" src="<%= store_batches_path(@store, :id => @batch.id) %>" style="border:none; height:100%;width:100%;"></iframe>

I have tried many ways but p3p header or csrf token is not sent on requests made in iframe

After struggling a lot and doing research, i finally found a link which helped me resolve my issue. http://forum.dhtmlx.com/viewtopic.php?f=19&t=32855

i added the CSRF token in the dhtmlx grid and it worked ie the content inside iframe started loading

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM