Go to file
2021-10-11 11:17:07 +02:00
cache Depedency Issues - Flooding Invalidation Queue (#9) 2020-02-04 16:06:48 +01:00
client/cms feature/cache dependencies (#5) 2019-10-22 11:14:19 +02:00
cmd/neosproxy debug basepath log 2019-11-22 18:51:35 +01:00
config strip base path 2019-11-22 18:11:40 +01:00
files binaries build 2019-03-11 16:49:16 +01:00
logging feat: etag cache fingerprinting (#4) 2019-10-02 17:28:43 +02:00
model stream initial status report 2019-01-08 14:46:36 +01:00
notifier feat: etag cache fingerprinting (#4) 2019-10-02 17:28:43 +02:00
proxy Implement invalidation through DELETE /cache/all (#8) 2019-11-28 20:07:58 +01:00
utils improve docker build + prevent concurrent map read and map write on fs cache 2019-03-12 17:20:41 +01:00
.gitconfig refactored to support a config file instead of flag parameters 2017-11-08 17:04:23 +01:00
.gitignore gitignore: allow unix bin 2019-03-11 16:48:05 +01:00
config-example.yaml basepath added to example config 2019-11-25 13:48:47 +01:00
Dockerfile feature/cache dependencies (#5) 2019-10-22 11:14:19 +02:00
format_release_notes.rb refactored to support a config file instead of flag parameters 2017-11-08 17:04:23 +01:00
go.mod security: update vulnerable dependency github.com/auth0/go-jwt-middleware to fixed version 2021-10-11 11:17:07 +02:00
go.sum security: update vulnerable dependency github.com/auth0/go-jwt-middleware to fixed version 2021-10-11 11:17:07 +02:00
Makefile improve docker build + prevent concurrent map read and map write on fs cache 2019-03-12 17:20:41 +01:00
README.md added auto-update flag 2017-03-19 17:06:11 +01:00

NEOSPROXY

Neosproxy could be used to proxy a NEOS CMS. It will cache requests to the Foomo.Neos.Contentserver package.

application

The application requires an API_KEY as an environment variable. This API_KEY is used for authorization on cache invalidation requests.

Furthermore you need to define on which address the proxy should listen. The NEOS endpoint must be configured by setting the "neos" parameter as well.

neosproxy --address=":80" --neos="https://www.myneosendpoint.com" --auto-update="1h"

web hooks

Neosproxy can call given comma seperated urls to notify you on events:

  • --callback-updated: called after update

If you want to skip tls verification you can pass the following option:

  • --callback-tls-verify=false: skip tls verification

You can optionally add a --callback-key to be sent as header with each call.

Example:

neosproxy --address=":80" --neos="https://www.myneosendpoint.com" --callback-tls-verify="false" --callback-updated="http://foo.com,https://bar.com" --callback-key="secret"

docker

For docker pass in the API_KEY as an environment variable as well. Run the container in the same network as your neos container.

docker run --rm -it -p="8080:80" -e="API_KEY=ZPNFYsXouqeRYPZ34cV4962KaZdU2Lp29LwbftMDeFBae3wcWX" foomo/neosproxy:latest -neos https://www.myneosendpoint.com 

routes

/contentserver/export

	GET: get the whole navigation tree as a contentserver json dump


/contentserverproxy/cache

	DELETE     : invalidate the cache

curl

Some curl examples for local development.

start proxy

export API_KEY=ZPNFYsXouqeRYPZ34cV4962KaZdU2Lp29LwbftMDeFBae3wcWX && \
go run neosproxy.go -address "127.0.0.1:8080" -neos "http://neos.localhost"

invalidate cache

curl -X "DELETE" -H "Authorization: ZPNFYsXouqeRYPZ34cV4962KaZdU2Lp29LwbftMDeFBae3wcWX" 127.0.0.1:8080/contentserverproxy/cache

get the contentserver export

curl -k 127.0.0.1:8080/contentserver/export