18 Commits

Author SHA1 Message Date
Łukasz Mierzwa
ba34e92791 fix(backend): correctly handle expires for static files
We can't set any headers after c.Abort() was called (which will happen in the static files middleware if file was found) so we need to refactor this code. New logic will be: set all headers early, if file is found response will include those, later add second middleware that clears those headers, it will only be hit if file wasn't found, so we'll clear headers on all 404s
2019-04-09 19:48:48 +01:00
Łukasz Mierzwa
75dd911842 fix(backend): don't set cache headers for 404s
Right now all requests for /static/ will have huge expires header, even if it's a 404. Only set headers if previous middleware did abort the request, meaning it found the file in static assets
2019-04-09 15:12:52 +01:00
Łukasz Mierzwa
c71834b43c chore(backend): bump caching headers to 1 year
It's currently 30 days, if that works than why not set it to a much higher value
2019-02-11 23:05:53 +00:00
Łukasz Mierzwa
42ae5bb70e fix(backend): don't cache custom assets
Since those files can change at any time we should ensure that they are not cached
2019-01-18 20:51:22 +00:00
Łukasz Mierzwa
db9f28cdf4 chore(backend): rename function for clarity
there's a typo and we now raise 404 on missing file
2018-12-27 21:20:44 +01:00
Łukasz Mierzwa
7cb5298ae3 feat(backend): set caching headers for all static files
Those should improve browser caching so we avoid fetching all css/js files on every page load
2018-12-27 21:19:58 +01:00
Łukasz Mierzwa
7c8b9b3dfe fix(backend): return 404 if custom asset files are missing 2018-12-27 16:07:54 +01:00
Łukasz Mierzwa
8d0b8037c6 feat(project): add support for loading extra css/js files 2018-10-30 20:56:44 +00:00
Łukasz Mierzwa
c6dc362186 fix(style): error strings should not be capitalized or end with punctuation or a newline 2018-08-11 23:03:02 +01:00
Łukasz Mierzwa
40e820c416 fix(style): remove dead code 2018-08-11 08:38:41 +01:00
Łukasz Mierzwa
32e3f946ab refactor(backend): turn index.html back into Go template
There are a few config keys that needs to be passed to ui code before react app starts, we'll render them in the index.html as template
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
a4a20ea3ef feat(ui): new UI written in React 2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
f202232be8 Version all bundles
This will tell webpack to add a hash to all bundles filenames, we generate script tags for loading those and inject them as templates. No more forced cache bypassing
2017-07-29 16:19:48 -07:00
Łukasz Mierzwa
8f5c246297 Move to fully webpack managed assets 2017-07-29 13:52:07 -07:00
Łukasz Mierzwa
71c0dce1f6 Vendor renamed Sirupsen/logrus to sirupsen/logrus, fix imports 2017-07-02 10:12:33 -07:00
Łukasz Mierzwa
06c7c03aa0 Style fixes
goimports fixed a few lines
2017-03-31 23:30:13 -07:00
Łukasz Mierzwa
f8420d4632 Use go-bindata-assetfs for static files
This allows unsee to be compiled into a single self-contained binary, without any need to external static files or templates
2017-03-26 17:41:17 -07:00
Łukasz Mierzwa
e239fd05fd Import code from internal repository (#1)
Import code from internal repository
2017-03-23 16:58:04 -07:00