Polymer / polymer-starter-kit

A starting point for Polymer apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NGINX + backend API + Polymer routes all to Polymer

exp0nge opened this issue · comments

Description

The setup includes polymer on / and an API on /api/. This is maybe a nginx issue but I think it's related to Polymer.

Expected outcome

/ routes to Polymer views, /api/ calls the backend API

Actual outcome

All routes are captured by Polymer regardless of nginx setting. The /api/ route loads properly when cache/hard reload is cleared.

Live Demo

Steps to reproduce

Browsers Affected

  • Chrome
  • Edge
  • Firefox
  • IE 11
  • Safari 8
  • Safari 9

Do you have a live demo you can share? It could be related to the generated service worker - what happens if you don't include it (remove navigator.serviceWorker.register)?

@keanulee That would do it. I had to unregister it for the nginx routing to properly work.