-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the admin dashboard to a subdomain (#56)
This commit moves the administration dashboard from its current location at /dashboard, to a subdomain named dashboard. On deployed sites, this will change the dashboard location from www.makigas.es/dashboard to dashboard.makigas.es. Given that the public website has no need for user authentication, the login path has moved to the dashboard subdomain as well. Therefore, www is only used for serving public pages now. Everything related to the admin panel is now located at the dashboard subdomain.
- Loading branch information
Showing
10 changed files
with
54 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
Rails.application.config.session_store :cookie_store, key: '_makigas_session' | ||
Rails.application.config.session_store :cookie_store, key: '_makigas_session', secure: Rails.env.production? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.feature "Dashboard", type: :feature do | ||
before { Capybara.default_host = "http://dashboard.example.com" } | ||
after { Capybara.default_host = "http://www.example.com" } | ||
|
||
context "when not logged in" do | ||
it "should not be success" do | ||
visit dashboard_path | ||
expect(page.current_path).not_to eq dashboard_topics_path | ||
end | ||
end | ||
|
||
context "when logged in" do | ||
it "should be success" do | ||
visit dashboard_path | ||
expect(page.status_code).to eq 200 | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters