GoogleChromeLabs / simplehttp2server

A simple HTTP/2 server for development
Other
1.74k stars 99 forks source link

"hosting" property not handled #21

Closed ithinkihaveacat closed 7 years ago

ithinkihaveacat commented 7 years ago

simplehttp2server doesn't seem to correctly handle firebase.json files in cases where the public key is a child of the hosting key.

For example, this firebase.json from the documentation is not parsed correctly:

{
  "hosting": {
    "public": "app",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  }
}

(The public key is ignored, and simplehttp2server serves from the "root".)

To make it work as expected, the public key needs to be moved to the root:

{
  "public": "app",
  "hosting": {
    "public": "app",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  }
}
surma commented 7 years ago

Oooh, good find! I did take care of the hosting key, but public had some special handling so that’s the odd one out. Will fix asap