diff --git a/backend/proxy/README.md b/backend/proxy/README.md index f3ec7fba..eb1d3ffc 100644 --- a/backend/proxy/README.md +++ b/backend/proxy/README.md @@ -31,10 +31,11 @@ To Provide your own configuration file you can create a `default.json` file in t ## Status Codes -- OutdatedVersions return a `HTTP 404` -- ActiveVersions return a `HTTP 503` if currently unavailable or the given code by running backend-node -- Unsupported versions (not configured as outdated or active) return a `HTTP 404` +- Successfull reponses come with a `HTTP 200` - No version header given returns a `HTTP 300` +- ActiveVersions return a `HTTP 503` if currently unavailable or the given code by running backend-node +- OutdatedVersions return a `HTTP 426` +- Unsupported versions (not configured as outdated or active) return a `HTTP 426` **NOTE:** The default configuration expects the client to set a version header: `X-StApps-Version=` diff --git a/backend/proxy/fixtures/visibleRoute.template b/backend/proxy/fixtures/visibleRoute.template index 678eca88..48eaea9d 100644 --- a/backend/proxy/fixtures/visibleRoute.template +++ b/backend/proxy/fixtures/visibleRoute.template @@ -19,14 +19,15 @@ location {{{ route }}} { return 300 'You have to supply a client/app version via the X-StApps-Version header!'; } - # Version is unsupported or never existed + # Version is unsupported by now or never existed (App/Client has to update) if ($proxyurl = unsupported) { {{{ cors }}} - return 404; + return 426; } - # The version existed, but is outdated now (App should update) + # The version existed, but is outdated now (App/Client should update) if ($proxyurl = outdated) { - return 404; + {{{ cors }}} + return 426; } # The version is correct, but backend is not responding if ($proxyurl = unavailable) {