Skip to content

Commit

Permalink
Add HTTPS or HTTP protocol to the preview link
Browse files Browse the repository at this point in the history
Fixes #5
  • Loading branch information
nestordedios authored Jan 5, 2018
1 parent 1eb9340 commit 137db7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/preview_link_widget.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" value="{{ app.request.server.get('HTTP_X_FORWARDED_PROTO') }}://{{ app.request.server.get('HTTP_HOST') }}{{ url }}" id="previewlink">
<input type="text" class="form-control" value="{{ app.request.server.get('HTTPS') ? 'https' : 'http' }}://{{ app.request.server.get('HTTP_HOST') }}{{ url }}" id="previewlink">
<span class="input-group-btn">
<button class="btn btn-default" type="button" id="previewlink-copy-button" data-toggle="tooltip" data-placement="bottom" data-copytarget="#previewlink" title="Copy to Clipboard">
<i class="fa fa-clipboard" aria-hidden="true"></i>
Expand Down

0 comments on commit 137db7b

Please sign in to comment.