Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Prevent .:format for e-mail addresses in url? #48

Closed
PatrickHeneise opened this Issue · 6 comments

3 participants

Patrick Heneise TJ Holowaychuk Michael Succi
Patrick Heneise

I'm authenticating with google and using the e-mail address as user name. For user/show the URL is /user/abc@abc.com. This will always download a file abc@abc.com, even though it should res.render 'user/show'. How can I prevent that? I tried setting req.format and req.params.format to undefined, but didn't work.

TJ Holowaychuk
Owner
tj commented

ideally we'd just use Accept, since that's what it's for

Patrick Heneise

header.accept = "text/plain", or how do I do that?

TJ Holowaychuk
Owner
tj commented

alternatively we could white-list formats, but then that gets a bit opinionated and messy, but otherwise it's ambiguous

TJ Holowaychuk
Owner
tj commented

but yeah we would just parse Accept's values/qualities and see if any of those formats are available

Patrick Heneise

res.contentType('text/html');

Thanks!

Michael Succi

I just ran into this issue, passing an email in the url. Where did you put that res.contentType('text/html') code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.