Skip to content

environment.prod.ts ? #24

@kosarko

Description

@kosarko

The JavaScript code in environment.prod.ts uses runtime browser properties (window.location) which may not work correctly if this file is used during build time. Verify that this configuration is only loaded at runtime in the browser, not during SSR or build processes.

Originally posted by @Copilot in #2

@milanmajchrak tohle neco vazne dela, nebo je to pozustatek nejakyho pokusu?

 environment.prod.ts: |-
    export const environment = {
      production: true,
      // Use the runtime browser host/port so client requests do not hardcode container ports
      rest: { ssl: true, host: window.location.hostname, port: window.location.port || (window.location.protocol === 'https:' ? 443 : 80), nameSpace: '/server' },
      ui: { ssl: true, host: window.location.hostname, port: window.location.port || (window.location.protocol === 'https:' ? 443 : 80), nameSpace: '/' }
    };

a pokud to neco dela, jak to funguje?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions