# Redirect to external site in a plugin?

**URL:** <https://meta.discourse.org/t/redirect-to-external-site-in-a-plugin/132932>\
**Category:** Development\
**Created:** [8 november 2019 om 15:30 UTC](https://meta.discourse.org/t/redirect-to-external-site-in-a-plugin/132932 "2019-11-08T15:30:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [18 november 2019 om 17:07 UTC](https://meta.discourse.org/t/redirect-to-external-site-in-a-plugin/132932/3 "2019-11-18T17:07:11Z")

</div>

I’m sorry to call you out, @sam, but I feel like there is something Discourse-specific and quick that you can help me with and I’ve been working on this for two weeks.

I’ve made my code work by inserting a proxy in the middle, but that doesn’t seem like a very good solution.

When I try to `redirect_to` an external site in an the SessionController that I am overriding, I get a CORS error. The same code from thinkific appears not to have that problem. Is there something special about doing a redirect from within `site_url/session`? Do I need to do the redirect from Javascript somehow? If so, could you point me in the general direction of how that might work?

---

_[View the full topic](https://meta.discourse.org/t/redirect-to-external-site-in-a-plugin/132932)._
