Skip to content

Commit

Permalink
remove ignore-cert
Browse files Browse the repository at this point in the history
  • Loading branch information
kjose90 committed Sep 10, 2024
1 parent 24a09b0 commit b8bf98b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
6 changes: 2 additions & 4 deletions packages/odata-service-writer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ async function generate(basePath: string, service: OdataService, fs?: Editor): P
} catch (error: any) {
if (error instanceof YAMLError && error.code === yamlErrorCode.nodeNotFound) {
ui5Config.addFioriToolsProxydMiddleware({
backend: [service.previewSettings as ProxyBackend],
ignoreCertError: service.ignoreCertError
backend: [service.previewSettings as ProxyBackend]
});
} else {
throw error;
Expand All @@ -110,8 +109,7 @@ async function generate(basePath: string, service: OdataService, fs?: Editor): P
if (fs.exists(ui5LocalConfigPath)) {
ui5LocalConfig = await UI5Config.newInstance(fs.read(ui5LocalConfigPath));
ui5LocalConfig.addFioriToolsProxydMiddleware({
backend: [service.previewSettings as ProxyBackend],
ignoreCertError: service.ignoreCertError
backend: [service.previewSettings as ProxyBackend]
});
}
}
Expand Down
3 changes: 1 addition & 2 deletions packages/odata-service-writer/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,5 @@ export interface OdataService {
*/
annotations?: EdmxAnnotationsInfo | CdsAnnotationsInfo;
localAnnotationsName?: string; // The name used in the manifest.json and as the filename for local annotations
previewSettings?: Partial<ProxyBackend>;
ignoreCertError?: boolean;
previewSettings?: Partial<ProxyBackend>
}
5 changes: 2 additions & 3 deletions packages/ui5-config/src/middlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ export function getBackendComments(
export function getFioriToolsProxyMiddlewareConfig(
backends?: FioriToolsProxyConfigBackend[],
ui5?: Partial<FioriToolsProxyConfigUI5>,
afterMiddleware = 'compression',
ignoreCertError = false
afterMiddleware = 'compression'
): {
config: CustomMiddleware<FioriToolsProxyConfig>;
comments: NodeComment<CustomMiddleware<FioriToolsProxyConfig>>[];
Expand All @@ -89,7 +88,7 @@ export function getFioriToolsProxyMiddlewareConfig(
name: 'fiori-tools-proxy',
afterMiddleware,
configuration: {
ignoreCertError: ignoreCertError
ignoreCertError: false
}
};
let comments: NodeComment<CustomMiddleware<FioriToolsProxyConfig>>[] = [
Expand Down
3 changes: 1 addition & 2 deletions packages/ui5-config/src/ui5config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ export class UI5Config {
const { config, comments } = getFioriToolsProxyMiddlewareConfig(
proxyConfig.backend,
proxyConfig.ui5,
afterMiddleware,
proxyConfig.ignoreCertError
afterMiddleware
);
this.document.appendTo({
path: 'server.customMiddleware',
Expand Down

0 comments on commit b8bf98b

Please sign in to comment.