Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GNU Generation
GnuPaste
Commits
7d1ec0cf
Commit
7d1ec0cf
authored
Dec 25, 2020
by
Antoine Fontaine
👣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix redirection when instance is in a subfolder
parent
877428c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/Paste/Handlers.hs
src/Paste/Handlers.hs
+3
-3
No files found.
src/Paste/Handlers.hs
View file @
7d1ec0cf
...
...
@@ -46,10 +46,10 @@ server :: ConnectionPool -- ^ Database pool.
server
pool
pasteDir
instanceUrl
=
return
(
homepage
instanceUrl
)
:<|>
servePastes
pool
pasteDir
:<|>
processUpload
pool
pasteDir
instanceUrl
:<|>
redirectToRoot
:<|>
redirectToRoot
instanceUrl
redirectToRoot
::
[
Text
]
->
Handler
Text
redirectToRoot
_
=
throwError
err303
{
errHeaders
=
[(
"Location"
,
"/"
)]
}
redirectToRoot
::
Text
->
[
Text
]
->
Handler
Text
redirectToRoot
instanceUrl
_
=
throwError
err303
{
errHeaders
=
[(
"Location"
,
encodeUtf8
instanceUrl
)]
}
servePastes
::
ConnectionPool
-- ^ Database pool.
->
FilePath
-- ^ Directory containing uploads.
...
...
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