Peace-and-Passion / luncho

Price level calculator: Pricing calculator that respects the price levels of countries using Purchase Power Parity (PPP). A library and server for currency conversion among local currency, US Dollar, and Luncho that is a common value index.
https://luncho-de-peace.org
MIT License
2 stars 0 forks source link

Return 404 error if access to non existent path #9

Open HIRANO-Satoshi opened 1 month ago

HIRANO-Satoshi commented 1 month ago

Currently 200 is returned and consumes download bandwidth.

HIRANO-Satoshi commented 1 month ago

We have this in app.yaml. No problem.

All other routes to the bundle for pushState

Luncho app is a Single Page App (SPA). We have '/' as the fallback. No problem.

    configureRouter(config: RouterConfiguration, router: Router) {
    ...
        config.map([
            { route: ['', 'countries'], href: '/countries', name: 'countries',
              moduleId: PLATFORM.moduleName('./countries'),
              auth: true, nav: true, title: 'All countries', },
            { route: 'single', href: '/single', name: 'single',
              moduleId: PLATFORM.moduleName('./single'),
              auth: true, nav: true, title: 'One country', },
            { route: 'about', href: 'about', name: 'about',
              moduleId: PLATFORM.moduleName('./about'),
              auth: true, nav: false, title: 'About', },

        ]);

        config.fallbackRoute('/');

The problem is that bundles are not cached within the browser.