hunk.code_window:     );
     }
   }
   export const IGNORE_WARNINGS = [
     // Webpack 5+ has no facility to disable this warning.
     // System.import is used in @angular/core for deprecated string-form lazy routes
     /System.import\(\) is deprecated and will be removed soon/i,
     // https://github.com/webpack-contrib/source-map-loader/blob/b2de4249c7431dd8432da607e08f0f65e9d64219/src/index.js#L83
     /Failed to parse source map from/,
   ];
   // eslint-disable-next-line @typescript-eslint/no-explicit-any
   export function statsWarningsToString(json: StatsCompilation, statsConfig: any): string {
     const colors = statsConfig.colors;
  
hunk.labels: keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep
hunk.file_path: packages/angular_devkit/build_angular/src/webpack/utils/stats.ts
hunk.type: replace
file: /**
   * @license
   * Copyright Google LLC All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  
  import { serveWebpackBrowser } from '../../index';
  import { executeOnceAndFetch } from '../execute-fetch';
  import {
    BASE_OPTIONS,
    DEV_SERVER_BUILDER_INFO,
    describeBuilder,
    setupBrowserTarget,
  } from '../setup';
  
  const FETCH_HEADERS = Object.freeze({ host: 'example.com' });
  
  describeBuilder(serveWebpackBrowser, DEV_SERVER_BUILDER_INFO, (harness) => {
    describe('option: "publicHost"', () => {
      beforeEach(async () => {
        setupBrowserTarget(harness);
  
        // Application code is not needed for these tests
        await harness.writeFile('src/main.ts', '');
      });
  
      it('does not allow an invalid host when option is not present', async () => {
        harness.useTarget('serve', {
          ...BASE_OPTIONS,
        });
  
        const { result, response } = await executeOnceAndFetch(harness, '/', {
          request: { headers: FETCH_HEADERS },
        });
  
        expect(result?.success).toBeTrue();
        expect(await response?.text()).toBe('Invalid Host header');
      });
  
      it('does not allow an invalid host when option is a different host', async () => {
        harness.useTarget('serve', {
          ...BASE_OPTIONS,
          publicHost: 'example.net',
        });
  
        const { result, response } = await executeOnceAndFetch(harness, '/', {
          request: { headers: FETCH_HEADERS },
        });
  
        expect(result?.success).toBeTrue();
        expect(await response?.text()).toBe('Invalid Host header');
      });
  
      it('allows a host when option is set to used host', async () => {
        harness.useTarget('serve', {
          ...BASE_OPTIONS,
          publicHost: 'example.com',
        });
  
        const { result, response } = await executeOnceAndFetch(harness, '/', {
          request: { headers: FETCH_HEADERS },
        });
  
        expect(result?.success).toBeTrue();
        expect(await response?.text()).toContain('<title>');
      });
    });
  });
  