Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add subdomain support to RouteHelper #1753

Open
jwoertink opened this issue Oct 17, 2022 · 0 comments
Open

Add subdomain support to RouteHelper #1753

jwoertink opened this issue Oct 17, 2022 · 0 comments

Comments

@jwoertink
Copy link
Member

If you have part of your application that need to be under a subdomain, there's currently no way to use link() to go to the action with that subdomain.

We could do this:

link to: Admin::Dashboard.with(subdomain: "admin")

https://github.com/luckyframework/lucky/blob/main/src/lucky/route_helper.cr

def self.with(

Or alternatively, we could make actions with subdomains auto redirect?

# something like this?
require_subdomain "admin", auto_redirect: true

# this would show "/dashboard", but then auto redirect to admin.whatever.site/dashboard
link to: Admin::Dashboard

Though.... thinking about it, that second idea might not be good because then EVERY link would always 302 🤔

I'm mainly looking for a way where I can say some links go to subdomain pages, and some don't.

@jwoertink jwoertink added the Hacktoberfest Valid Issue for Hacktoberfest label Oct 20, 2022
@jwoertink jwoertink removed the Hacktoberfest Valid Issue for Hacktoberfest label Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant