Public | Automated Build

Last pushed: 4 months ago
Short Description
A NEOS proxy with support for the Foomo.Neos.Contentserver package
Full Description

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
Docker Pull Command
Owner
foomo
Source Repository

Comments (0)