# Left-clicking same-domain links to URLs not on the whitelist is broken

**URL:** <https://meta.discourse.org/t/left-clicking-same-domain-links-to-urls-not-on-the-whitelist-is-broken/54722>\
**Category:** Feature\
**Created:** [23 Diciembre, 2016 21:46 UTC](https://meta.discourse.org/t/left-clicking-same-domain-links-to-urls-not-on-the-whitelist-is-broken/54722 "2016-12-23T21:46:13Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![DavidEGrayson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidegrayson/32/120237_2.png) [@DavidEGrayson](https://meta.discourse.org/u/DavidEGrayson)\
**Post date:** [23 Diciembre, 2016 21:46 UTC](https://meta.discourse.org/t/left-clicking-same-domain-links-to-urls-not-on-the-whitelist-is-broken/54722/1 "2016-12-23T21:46:13Z")

</div>

This is a continuation of the discussion from [https://meta.discourse.org/t/left-clicking-raw-links-return-404-errors/31314](https://meta.discourse.org/t/left-clicking-raw-links-return-404-errors/31314), which was closed.

I just noticed that if I upload an attachment and then I left-click on a link for it in the body of a forum post, the Discourse/Ember router doesn’t know what to do and I get a “Oops! That page doesn’t exist or is private.” error. The link will work fine if the user opens it in a new tab.

Here is an example of a forum post with a link (Opcode.cs) that doesn’t work when you left-click on it:

[https://forum.pololu.com/t/maestro-windows-10-iot-native-usb-driver/10808/2](https://forum.pololu.com/t/maestro-windows-10-iot-native-usb-driver/10808/2)

I tried to make an example attachment link on this forum that doesn’t work, but attachments for this forum are served from a different domain so I cannot trigger the bug. The bug only affects forums that are serving attachments from the same domain as forum posts.

Even though I have a limited understanding of front-end javascript routing stuff, I’ll repeat my suggestion: it seems like if the Discourse/Ember router does not recognize a URL, then it should trigger a full page load of that URL in order to give other parts of the web server stack a chance to respond to the URL instead (e.g. your web server or your back-end application). That way, the javascript router doesn’t have to know the full set of URLs that are valid on your web domain. It would prevent bugs like this one and it would allow people to host static files on their domain that are not part of the Discourse app, and successfully link to them from forum posts without having to [hack the Discourse/Ember router](https://github.com/discourse/discourse/commit/f0937dc5d3d60ffc63a153c74b3573edf6e9e27d). I run into variants of this bug regularly while using Discourse and it seems like the suggestion above would solve the bug for good. Thanks!

---

_[View the full topic](https://meta.discourse.org/t/left-clicking-same-domain-links-to-urls-not-on-the-whitelist-is-broken/54722)._
