{
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "storage": {
    "rules": "storage.rules"
  },
  "functions": {
    "source": "functions",
    "runtime": "nodejs20"
  },
  "emulators": {
    "auth": {
      "host": "0.0.0.0",
      "port": 9099
    },
    "firestore": {
      "host": "0.0.0.0",
      "port": 8080
    },
    "functions": {
      "host": "0.0.0.0",
      "port": 5001
    },
    "storage": {
      "host": "0.0.0.0",
      "port": 9199
    },
    "ui": {
      "host": "0.0.0.0",
      "port": 4000,
      "enabled": true
    },
    "singleProjectMode": true
  },
  "extensions": {},
  "hosting": {
    "site": "sigaepp",
    "public": ".",
    "ignore": [
      "firebase.json",
      ".firebaserc",
      "functions/**",
      "node_modules/**",
      ".github/**",
      "config/config.docker.js",
      "config.local.js",
      "package.json",
      "package-lock.json",
      "sonar-project.properties",
      "README.md",
      "SETUP_LOCAL.md",
      "index.js"
    ],
    "rewrites": [
      { "source": "**", "destination": "/processos.html" }
    ],
    "headers": [
      {
        "source": "**",
        "headers": [
          { "key": "X-Frame-Options",           "value": "SAMEORIGIN" },
          { "key": "X-Content-Type-Options",     "value": "nosniff" },
          { "key": "Referrer-Policy",            "value": "strict-origin-when-cross-origin" },
          { "key": "Permissions-Policy",         "value": "camera=(), microphone=(), geolocation=()" },
          { "key": "Strict-Transport-Security",  "value": "max-age=31536000; includeSubDomains" },
          {
            "key": "Content-Security-Policy",
            "value": "default-src 'self' https: data:; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://www.gstatic.com; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; connect-src 'self' https://www.gstatic.com https://cdn.jsdelivr.net https://firestore.googleapis.com https://firebasestorage.googleapis.com https://identitytoolkit.googleapis.com https://securetoken.googleapis.com https://api.emailjs.com https://*.a.run.app https://*.cloudfunctions.net https://docs.google.com https://*.googleusercontent.com https://api.allorigins.win; img-src 'self' data: blob: https:; font-src 'self' https://cdn.jsdelivr.net data:; object-src 'none'; base-uri 'self'"
          }
        ]
      }
    ]
  }
}

