Commit Graph

321 Commits

Author SHA1 Message Date
Max Schmitt 6eca2572c8
Create FUNDING.yml 2020-07-02 15:24:57 +02:00
Max Schmitt 3c249d5bb9 fix: bundling of static assets 2019-03-20 15:03:03 +01:00
Max Schmitt 7c77642280 fix: compilation: switched to packr2 2019-03-20 14:48:32 +01:00
Max Schmitt dcb52aa0de fix: build error due react-router-dom 2019-03-20 08:37:50 +01:00
sliptripfall 63d502fce1 Okta Integration - Bring Okta OAuth as an available option (#128)
- Edited package.json for react bug
 	+ https://github.com/ReactTraining/react-router/issues/6630
2019-03-20 08:28:01 +01:00
Max Schmitt ea5f8c888e core: bumped dependencies (fix: #129) 2019-03-19 13:00:12 +01:00
Max Schmitt d175c9a103 Merge branch 'master' of https://github.com/mxschmitt/golang-url-shortener 2019-02-26 11:07:43 +01:00
Max Schmitt f20799b81f added macOS output binary 2019-02-26 11:07:39 +01:00
Max Schmitt 13f8510d08 bumped react dependencies 2019-02-26 11:07:21 +01:00
Max Schmitt 28eb25ab38
Create CONTRIBUTING.md 2019-02-26 11:04:53 +01:00
memory 9ad05c07b8
Merge pull request #125 from rasa/patch-1
Fix typo in readme
2018-11-01 20:31:06 -04:00
Ross Smith II 26ad2cd2ab
Fix typo in readme 2018-11-01 16:38:47 -07:00
Max Schmitt 2efb7b58b9 added workaround for build failture 2018-09-27 15:26:17 +02:00
Max Schmitt 8a78640a5b bump dependencies 2018-09-27 15:12:34 +02:00
Max Schmitt c5fa7314ef fixed entry is expired issue (fix: #120) 2018-08-21 11:50:17 +02:00
Max Schmitt f6e7e6fd9f fixed not cleaned up and displayed shorted URL (#120) 2018-08-21 11:33:10 +02:00
Max Schmitt 7968d47206 fixed missing forgotten displayURL handler 2018-08-21 11:17:10 +02:00
Max Schmitt 2360ce36ac refactored getDisplayURL 2018-08-21 11:08:17 +02:00
Max Schmitt 23bb6b3e78 bump dependencies 2018-08-21 10:52:36 +02:00
Jeff Billimek 7265b939f4 clarifying cf manifest and adding to gitignore (#123) 2018-08-18 16:52:14 +02:00
Jeff Billimek 5c005ae890 configurable app DisplayURL for the UI (#121)
* changes to enable custom 'display' URL in app

* making example.yml use an empty string for DisplayURL
2018-08-14 13:04:07 +02:00
Jeff Billimek eea341793f use redis as a session store backend (#119)
* support for custom github endpoints

* implementing requested changes

* using redis for session store if it is configured

* using non-deprecated sessions lib

* hard-coding redis session store private key for multiple instances

* re-working GetPrivateKey to return stastic key only when redis is used

* making config entries for redis sesion db and shared key
2018-08-14 13:02:10 +02:00
Jeff Billimek 890ff87a9c support for deployments to cloudfoundry (#116)
* support for deploying to cloudfoundry

* tweaking readme
2018-08-09 13:21:17 +02:00
Jeff Billimek 566f2a354c support for custom github endpoints (#115)
* support for custom github endpoints

* implementing requested changes

* refactor 'GitHubEndpointURL' to 'EndpointURL'
2018-08-09 13:05:49 +02:00
Max Schmitt c885c70982
readme: removed wip 2018-07-29 14:03:19 +02:00
Max Schmitt 238835460b web: bump dependencies and fixed short if statement 2018-07-29 13:54:50 +02:00
memory 55abb0b7ff Handle missing links gracefully. (#112)
Herein, we do two things:

1- implement a custom handler for the virtual filesystem that,
   rather than returning a simple (and ugly) 404 page, redirects
   the client back to the root URL with the `customUrl` query
   parameter filled out with the value of the request path.

2- In home.js, if the `customUrl` param is filled out, automatically
   select the `custom` state setting, and pre-fill out the CustomID
   input field with the value of that param.

In short, the server will never again return a 404 error, but instead
will gracefully prompt the user to fill in the missing link.
2018-07-26 21:21:48 +02:00
Max Schmitt 8f770c7056 renamed config file in bintray archive 2018-05-25 23:58:54 +02:00
Max Schmitt 3ebe9d042f
Refactored project layout (fix: #109) (#111)
* Reworked project layout

* adjusted Makefile for new folder structure

* fixed path errors

* Fixed test import paths

* fixes

* only pushing image to the docker hub if the branch is master
2018-05-25 23:48:23 +02:00
Max Schmitt 454199ad9e Fixed bintray deployment (fix: #110) 2018-05-25 22:26:40 +02:00
Max Schmitt 76589cdbbb don't cleaning up after build process for deployment (#110) 2018-05-25 22:18:56 +02:00
Max Schmitt c4ae856307 Merge branch 'master' of https://github.com/mxschmitt/golang-url-shortener 2018-05-25 22:14:45 +02:00
Max Schmitt 918d28695f Fixed environment struct tags (hotfix: #108) 2018-05-25 22:14:30 +02:00
Max Schmitt 28567a30b9
fixed travis-ci go version config fail 2018-05-25 22:11:34 +02:00
Max Schmitt 7461418145 Merge branch 'master' of https://github.com/mxschmitt/golang-url-shortener 2018-05-25 22:06:54 +02:00
Max Schmitt 5e6804c0a4 fixed bintray deployment (#110) 2018-05-25 22:06:49 +02:00
Max Schmitt 14cfeb3387
Removed due PR spam 2018-05-25 21:37:03 +02:00
Max Schmitt 87302370d0
Rename LICENSE.md to LICENSE
Because it's not really a markdown file
2018-05-25 21:36:10 +02:00
memory 7fd1287493 Clean up redis configuration (#108)
* Clean up redis configuration

- put redis configs into their own struct
- put a redisConf struct into the default config so that envstruct
  will populate it
- allow tweaking of retry, db index and read/write timeout settings
- update example config.yaml

This is potentially a breaking change for anyone who's been using
the redis backend already, but maybe that's just me? :)

* fix struct tags and s/Db/DB/

* remove unnecessary declarations
2018-05-25 21:32:39 +02:00
Max Schmitt a954a58bf2 updated frontend dependencies 2018-05-25 21:19:58 +02:00
memory 6dac9a7fcb Add option to disable access logging (#107)
For an internally-facing and/or test/qa deployment, web access logs may
be a waste of stackdriver/cloudwatch quota. :)
2018-05-21 17:31:13 +02:00
memory 45a128713c Look for X-Forwarded-Proto when constructing URLs (#105) 2018-05-19 02:36:41 +02:00
memory fab091d75a add healthcheck handling (#106)
Add a special path -- `/ok` that can be used as a healthcheck for e.g.
kubernetes or amazon ECS.

When not in debug mode, do not generate logs for the healthcheck path.

This requires implementing our own version of ginrus.Ginrus, as the
upstream one does not support the `notlogged` argument(s) that
gin.LoggerWithWriter has.
2018-05-19 02:36:14 +02:00
memory fbf234407b Add config option to disable log coloration (#103)
* Add config option to disable log coloration

Color logs are great in person, but not so awesome when you're trying
to view them in a log aggregation services e.g. splunk, stackdriver,
ELK, etc.

* dump running config to log on startup

* init config before testing

...and use a temporary directory for config_test, lest the presence
of a local one cause confusing test results.
2018-05-17 18:50:43 +02:00
memory b92f3df301 pass credentials with AJAX requests (#104)
This is necessary for identity-aware proxies to work.
2018-05-17 17:01:14 +02:00
memory 45bb3bb323 make docker builds (more) host-OS independent (#102)
Sadly, `date --iso8601` is a GNU coreutils-ism, and returns an
error on platforms that still ship a more generically posix-esque
`/bin/date`: notably FreeBSD and macOS do not support the flag.

Replace with a standard date formatstring that should be portable
to both Linux macOS.  (And probably Solaris/OpenSolaris/SmartOS
as well?)
2018-05-08 21:15:29 +02:00
memory f8086c7492 support using an identity-aware proxy for auth (#101)
Rather than directly fetching and verifying OAuth assertions, assume
that the app is running behind an authenticating proxy, and trust
headers that are set by the proxy.

- add config support for an "authbackend" directive, supporting either
  "oauth" or "proxy" as values; the "proxy" setting selects our new codepath
- add initProxyAuth and proxyAuthMiddleware methods to the Handler struct
- rename authMiddleWare to oAuthMiddleware in the Handler struct
- construct a faked auth.JWTClaims object when in proxy mode
- update Handler.handleAuthCheck() to return useful info in proxy mode
- add a fallback user icon for proxy mode
- implement check for proxy mode in index.js

See for example and reference:

https://cloud.google.com/iap/docs/identity-howto
https://cloud.google.com/beyondcorp/
2018-05-08 20:34:32 +02:00
Max Schmitt 912c53cdcb
Fixed comment styling of #100 2018-05-07 22:54:08 +02:00
memory 5e5d6a61f0 Added redis support (#100)
- add a redis store implementing stores.Storage
- add config file support to pick a storage backend
- add config file support to set redis host:port and password
- add docker_releases to .gitignore
- update README to mention redis support
- update example config.yaml
2018-05-07 22:48:37 +02:00
Max Schmitt 17df45e973
Merge pull request #98 from mxschmitt/renovate/react-responsive-4.x
fix(deps): update dependency react-responsive to v4.1.0
2018-03-26 18:47:52 +02:00