Commit Graph

251 Commits

Author SHA1 Message Date
mutantmonkey a69aa95a87 Add `linx-cleanup` info to readme 2017-05-04 21:55:15 -07:00
mutantmonkey 32b537a057 Add missing `flag.Parse()` call 2017-05-03 21:12:41 -07:00
mutantmonkey c6f62fccdf Drop Mercurial from Dockerfile
We no longer have any Mercurial dependencies, so we don't need to
install it anymore.
2017-05-01 21:49:27 -07:00
mutantmonkey b7fadd9676 Add linx-cleanup tool
This doesn't completely fix #116, but it makes setting up a cron job to
do cleanup much more pleasant.
2017-05-01 21:27:28 -07:00
Andrei Marcu d8568e141f Merge pull request #121 from mutantmonkey/remove_mime_extension_map
Remove mime type to extension map from util.go
2017-03-29 21:42:31 -07:00
mutantmonkey bb7f7a1774 Remove mime type to extension map from util.go
This is no longer used, so it can be removed.
2017-03-25 15:11:21 -07:00
andreimarcu 37f9a0cbbc Change unknown extension from .ext to .file 2017-03-25 08:44:18 -07:00
Andrei Marcu 1c1d3127ab Merge pull request #120 from mutantmonkey/switch_to_filetype
Switch to https://github.com/h2non/filetype
2017-03-25 08:22:28 -07:00
mutantmonkey e6ac89d6dc Switch to https://github.com/h2non/filetype
This library is much better at detecting MIME types properly than the
existing one. Fixes #117.
2017-03-25 01:08:56 -07:00
Andrei Marcu e588d78299 Merge pull request #112 from mutantmonkey/issue_111
Fix max expiry when provided expiry is 0
2016-11-02 19:36:59 -07:00
mutantmonkey 647aa2c0f6 Fix max expiry when provided expiry is 0
Previously, we did not properly handle the case where the provided
expiry was zero and the max expiry was configured to be nonzero; add an
additional check to cover this case.

Fixes #111.
2016-11-02 19:31:32 -07:00
Andrei Marcu 0e768cc6f4 Merge pull request #109 from culdev/master
Fix file upload for Internet Explorer
2016-10-23 13:16:08 -07:00
culdev 8f384dc5ce Use value instead of selectedOptions. 2016-10-23 21:07:47 +02:00
Andrei Marcu e9ae7a794f Merge pull request #105 from Thor77/systemd-service
Add Install-section to systemd-service
2016-10-11 07:56:44 -07:00
Thor77 c75cd5ef9e Add Install-section to systemd-service 2016-10-09 14:59:54 +02:00
andreimarcu eb036f2819 Fix typo 2016-09-18 22:13:52 -07:00
Andrei Marcu 29d3157a03 Merge pull request #102 from mutantmonkey/maxexpiry
Add option for maximum expiration time (fixes #99)
2016-09-18 22:09:05 -07:00
mutantmonkey fef43d856e Add option for maximum expiration time (fixes #99) 2016-09-18 22:05:26 -07:00
Andrei Marcu 3321144e74 Merge pull request #101 from mutantmonkey/docker
Add Dockerfile
2016-09-17 20:27:57 -07:00
mutantmonkey 932a470ead add Docker instructions to readme 2016-09-17 20:20:46 -07:00
mutantmonkey 2e5521ce7d Add Dockerfile
This will build the binary directly in the image without a need to have
Go installed locally.
2016-09-17 19:27:39 -07:00
Thor77 4ef3f33821 Add systemd-service (#96) 2016-08-22 11:02:46 -10:00
andreimarcu 81a1513809 Add newline for PUT response 2016-07-22 18:15:44 -07:00
andreimarcu 1e1f28658d Remove spaces in mime mapping and ensure no spaces in filenames 2016-07-22 18:08:59 -07:00
Andrei Marcu ca11d99678 Merge pull request #93 from mutantmonkey/reduce_open_calls
Remove unnecessary file processing in display.go
2016-07-07 20:06:49 -07:00
mutantmonkey 93d37002dd remove unnecessary file processing in display.go
There is no need to open the file here; nothing is done with the header
after it is read.
2016-07-07 19:34:53 -07:00
andreimarcu 9467be9717 No margin/border without line numbers 2016-06-17 21:22:24 -07:00
andreimarcu e6db8553b0 Fix line numbers for text 2016-06-16 22:33:32 -07:00
Atrox 027f5cce42 Add ability to short urls for uploaded content (#85)
Add ability to short urls for uploaded content
2016-06-15 08:42:57 -07:00
Andrei Marcu 30d2d63466 Merge pull request #87 from Atrox/sitename
Fix that custom sitename gets ignored
2016-06-15 08:30:42 -07:00
Atrox aedd7bc589 Fix that custom sitename gets ignored 2016-06-15 14:33:51 +02:00
andreimarcu f06b06fe76 Add overflow-wrap to lines.css 2016-06-15 01:35:03 -07:00
andreimarcu 0a361a268c Get rid of highlightjs-line-numbers.js 2016-06-15 01:17:25 -07:00
andreimarcu d6755486b2 Sanitize upload response (Fixes #79) 2016-06-15 00:16:57 -07:00
andreimarcu e8d2d75c1c Update documentation 2016-06-14 23:38:36 -07:00
andreimarcu 47a1aa6396 Infer sitename from Host if empty 2016-06-14 23:21:39 -07:00
Andrei Marcu 9c6088cfe5 Merge pull request #84 from mutantmonkey/abstract_storage
use abstracted storage for flexibility
2016-06-14 21:10:46 -07:00
mutantmonkey fcd18eceec use abstracted storage for flexibility
I moved the storage functionality into the StorageBackend interface,
which is currently only implemented by LocalfsBackend.
2016-06-08 20:18:31 -07:00
Andrei Marcu 61eb32a79b Merge pull request #83 from mutantmonkey/csp_frame_ancestors
Use Content-Security-Policy frame-ancestors
2016-06-05 00:29:13 -07:00
Andrei Marcu 2fb58e7da1 Merge pull request #82 from mutantmonkey/infer_siteurl
Infer site URL from host and headers
2016-06-05 00:28:46 -07:00
mutantmonkey 47670af185 Infer site URL from host and headers
We can use the Host property of the request and the X-Forwarded-Proto to
infer the site URL. To reduce complexity, the path is not inferred, and
it is assumed that linx-server is running at /. If this is not the case,
the site URL must be manually configured; this is no different than it
was before.
2016-06-04 18:34:22 -07:00
mutantmonkey 2b5cc07005 Use Content-Security-Policy frame-ancestors
X-Frame-Options has been deprecated by Content Security Policy Level 2.
We will need to provide the option for older browsers for the time
being, but frame-ancestors is preferred on newer ones.
2016-06-04 15:04:32 -07:00
andreimarcu afa65349cc Fix typos in API template 2016-06-04 00:36:51 -07:00
Andrei Marcu 14ba403145 Merge pull request #81 from mutantmonkey/addheaders
Add ability to set arbitrary headers
2016-06-03 22:59:29 -07:00
mutantmonkey 39bb999db6 Add ability to set arbitrary headers
This is useful if you want to add headers for things like HTTP Strict
Transport Security or HTTP Public Key Pinning.
2016-06-03 22:49:01 -07:00
Andrei Marcu 1f3bc4bfea Merge branch 'mutantmonkey-better_extension_handling' 2016-02-15 14:44:43 -08:00
mutantmonkey b0d2f2a142 support .tar.gz-style extensions
Some extensions actually consist of multiple parts, like .tar.gz, so we
should handle this properly instead of merging part of the extension
with the bare name. Right now only tar is allowed, but others can be
added easily.

Fixes #74.
2016-02-12 21:27:39 -08:00
Andrei Marcu bc66bcc069 Merge pull request #73 from mutantmonkey/workaround_chrome_nonsense
workaround chrome nonsense with CSP
2015-12-04 22:34:36 -05:00
mutantmonkey 817ac67632 workaround chrome nonsense with CSP
Apparently the Chromium developers have decided that it was a good idea
for them to use inline styles on the image/PDF viewers in their browser.
I have no idea why they would think this, as it is not, but since this
causes breakage we allow unsafe-inline for styles on files.
2015-12-04 19:28:30 -08:00
andreimarcu 5dcfca5f74 Order matters no. 2 2015-12-04 00:19:33 -05:00