Skip to content

Commit

Permalink
CORS permission for dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
erayd committed Nov 23, 2020
1 parent 97ec8f8 commit 12a96f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Caddyfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(slightly) {
root ./public
file_server browse
file_server

@naked_path {
path_regexp (^|/)[^./]+$
Expand All @@ -19,6 +19,9 @@
rewrite @naked_path /
rewrite @md_path {http.matchers.file.relative}

file_server /dist/* browse
header /dist/* Access-Control-Allow-Origin *

handle_errors {
rewrite @md_path {http.matchers.file.relative}
rewrite * /
Expand Down

0 comments on commit 12a96f2

Please sign in to comment.