diff options
author | amouhzi <hassan.amouhzi@gmail.com> | 2013-07-30 16:48:00 +0200 |
---|---|---|
committer | Hassan Amouhzi <github@anezi.net> | 2013-08-15 21:25:09 +0200 |
commit | 39d8a64d255a80df1ed3194f88ac56486b027870 (patch) | |
tree | 17e1ce8ebde53f88aee03c473dd4493e815100ac /app/uploaders/attachment_uploader.rb | |
parent | 55582047413c639a4843f52f9869fafc01bf6522 (diff) | |
download | gitlab-ce-39d8a64d255a80df1ed3194f88ac56486b027870.tar.gz |
Fixes grack authentification under relative_url_root
Ref: https://github.com/gitlabhq/gitlabhq/commit/e6159b8725f99af78f446f8d33fa0e52b7780430
Ref: https://github.com/gitlabhq/gitlabhq/pull/3204
Ref: https://github.com/gitlabhq/gitlabhq/issues/1228
Add Rails' variable in application.rb to support relative url
This variable is used by assets compilation and other modules.
Note that user needs to change application.rb too
Restrict session cookie to the relative path if set.
Ref: https://github.com/gitlabhq/gitlabhq/commit/2c2f1e31856a4decdae469974f5bea8245316f7e
Fix Update attachment_uploader.rb bug with relative URL
See: https://github.com/gitlabhq/gitlabhq/commit/161afda3fa4fca58f396e9c3acbd72bc14490ace
Fix Wall relative bug with attachement files (javascript)
Diffstat (limited to 'app/uploaders/attachment_uploader.rb')
-rw-r--r-- | app/uploaders/attachment_uploader.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/uploaders/attachment_uploader.rb b/app/uploaders/attachment_uploader.rb index c0afe9686f1..98794c9470b 100644 --- a/app/uploaders/attachment_uploader.rb +++ b/app/uploaders/attachment_uploader.rb @@ -21,7 +21,7 @@ class AttachmentUploader < CarrierWave::Uploader::Base end def secure_url - "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}" + Gitlab.config.gitlab.relative_url_root + "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}" end def file_storage? |