Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bookme
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christopher League
bookme
Commits
a9f8a744
Commit
a9f8a744
authored
Jun 05, 2018
by
Christopher League
🖥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temporary: make /version show request headers
So I can debug HTTPS termination.
parent
1d89563e
Pipeline
#535
passed with stage
in 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/Handlers.hs
src/Handlers.hs
+5
-2
No files found.
src/Handlers.hs
View file @
a9f8a744
...
...
@@ -29,6 +29,7 @@ import Calendar
import
Control.Monad.Trans.Maybe
import
Data.FileEmbed
(
embedFile
)
import
qualified
Data.SortedList
as
SL
import
qualified
Network.Wai
import
Development.GitRev
import
Data.Time.Zones
(
localTimeToUTCTZ
,
utcToLocalTimeTZ
)
import
qualified
FreshCache
as
FC
...
...
@@ -142,5 +143,7 @@ getRobotsR =
return
$
TypedContent
typePlain
$
toContent
$
(
embedFile
"config/robots.txt"
)
getVersionR
::
Handler
Text
getVersionR
=
return
$
$
(
gitHash
)
<>
if
$
(
gitDirty
)
then
"+"
else
""
getVersionR
=
do
req
<-
reqWaiRequest
<$>
getRequest
let
hs
=
foldMap
(
\
(
h
,
v
)
->
tshow
h
<>
": "
<>
tshow
v
<>
"
\n
"
)
$
Network
.
Wai
.
requestHeaders
req
return
$
hs
<>
"
\n
"
<>
$
(
gitHash
)
<>
if
$
(
gitDirty
)
then
"+"
else
""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment