Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/upright/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ def hostname
end

def default_url_options
if Rails.env.production?
{ protocol: "https", host: "#{global_subdomain}.#{hostname}", domain: hostname }
else
if Rails.env.local?
{ protocol: "http", host: "#{global_subdomain}.#{hostname}", port: ENV.fetch("PORT", 3000).to_i, domain: hostname }
else
{ protocol: "https", host: "#{global_subdomain}.#{hostname}", domain: hostname }
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/upright/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Upright::Engine < ::Rails::Engine
key: "_upright_session",
domain: :all,
same_site: :lax,
secure: Rails.env.production?,
secure: !Rails.env.local?,
expire_after: 24.hours
end

Expand Down