Przeglądaj źródła

set Access-Control-Allow-Origin in netlify config

zwbetz-gh 4 lat temu
rodzic
commit
6e91d32813
1 zmienionych plików z 7 dodań i 2 usunięć
  1. 7 2
      netlify.toml

+ 7 - 2
netlify.toml

@@ -1,8 +1,13 @@
 [build]
   publish = "exampleSite/public"
-  command = "cd exampleSite && hugo --gc --themesDir ../.."
+  command = "cd exampleSite && hugo --themesDir ../.."
 
 [build.environment]
   HUGO_VERSION = "0.72.0"
   HUGO_THEME = "repo"
-  HUGO_BASEURL = "https://cupper-hugo-theme.netlify.com/"
+  HUGO_BASEURL = "https://cupper-hugo-theme.netlify.com"
+
+[[headers]]
+  for = "/*"
+    [headers.values]
+      Access-Control-Allow-Origin = "*"