javascript - My website should not work in others website iframes without prior authorization. -
we offering iframe based application made php. client should place website iframe in website. requirement validate website accessing iframe. want place iframe in pre-authorized websites only. how block others place iframe in theit websites? know http_referer not giving correct referer always.
thanks in advance.
there's no guaranteed solution. web browser not required send http_referrer, , can lie if wanted anyway.
the guaranteed solution client server (the 1 hosting iframe) connect php application , go through authorization process. perhaps authorization generate auth token... client server use auth token parameter in iframe's src url. php application validate auth token , return iframe's contents. @ point, invalidate unique auth token other page requests couldn't reuse it.
Comments
Post a Comment