Skip to content

Commit

Permalink
Merge branch 'main' into feature/discover-pagination
Browse files Browse the repository at this point in the history
Signed-off-by: Kishor Rathva <kishorrathva8298@gmail.com>
  • Loading branch information
kishor82 committed Dec 16, 2023
2 parents aed8b0d + d8cbc17 commit dac7ad7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Decouple] Add new cross compatibility check core service which export functionality for plugins to verify if their OpenSearch plugin counterpart is installed on the cluster or has incompatible version to configure the plugin behavior([#4710](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4710))
- [Discover] Display inner properties in the left navigation bar [#5429](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5429)
- [Discover] Added customizable pagination options based on Discover UI settings [#5610](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5610)
- [Custom Branding] Relative URL should be allowed for logos ([#5572](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5572))

### 🐛 Bug Fixes

Expand Down
5 changes: 5 additions & 0 deletions src/core/server/rendering/rendering_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ describe('RenderingService', () => {
const result = await service.isUrlValid('/', 'config');
expect(result).toEqual(false);
});

it('checks relative URL returns true', async () => {
const result = await service.isUrlValid('/demo/opensearch_mark_default.png', 'config');
expect(result).toEqual(true);
});
});

describe('isTitleValid()', () => {
Expand Down
3 changes: 3 additions & 0 deletions src/core/server/rendering/rendering_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ export class RenderingService {
this.logger.get('branding').error(`${configName} config is invalid. Using default branding.`);
return false;
}
if (url.startsWith('/')) {
return true;
}
return await Axios.get(url, {
httpsAgent: this.httpsAgent,
adapter: 'http',
Expand Down

0 comments on commit dac7ad7

Please sign in to comment.