Skip to content

Commit

Permalink
Merge pull request #111 from Financial-Times/feature/UPPSF-4173-add-c…
Browse files Browse the repository at this point in the history
…m-live-events-api

Adding cm-live-events-api to the api policies
  • Loading branch information
martin-stanchev committed Feb 6, 2023
2 parents 55561df + 15c6081 commit 8ca3cfd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ private Set<KnownEndpoint> getKnownWildcardEndpoints(
apiFilters.contentPreviewFilters()));
knownWildcardEndpoints.add(
createEndpoint(environment, configuration, "^/concordances.*", "concordances"));
knownWildcardEndpoints.add(
createEndpoint(
environment,
configuration,
"^/live-events.*",
"live-events",
apiFilters.liveEventsFilter()));
// DEFAULT CASE: Just forward it
knownWildcardEndpoints.add(createEndpoint(environment, configuration, "^/.*", "other"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,14 @@ public ApiFilter[] contentPreviewFilters() {
internalAnalyticsTagsFilter
};
}

public ApiFilter[] liveEventsFilter() {
return new ApiFilter[] {
stripProvenance,
stripLastModifiedDate,
identifiersFilter,
alternativeStandfirstsFilter,
alternativeTitlesFilter
};
}
}

0 comments on commit 8ca3cfd

Please sign in to comment.