My website's root page automatically redirects all users to some subpage via http header.
http://example.com/ → http://example.com/subpage
I want to use my domain example.com
as OpenID. The problem is that I have to add some tag to my root page, but it should redirect all users on subpage. I can change the type of redirection and use e.g. meta tag. But is there a better way to implement that and don't break instant http redirect?
Maybe I can somehow distinguish OpenID request and only that tim开发者_C百科e respond with html?
You can specify the location of a Yadis document (which could be a static file in public/
) by setting the X-XRDS-Location
header, or you can choose to handle the application/xrds+xml
MIME type at your application root dynamically.
- See the Yadis wikipedia page for an overview of what the Yadis document is and what you need to return in your XRDS document.
- There's a rubyonrails.org blog post on how to handle a custom MIME type. It looks like this is still how it works in Rails 3 (you don't need a custom renderer).
精彩评论