| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| |
|
| | |
| | (cors-api) { |
| | @match-cors-api-preflight method OPTIONS |
| | handle @match-cors-api-preflight { |
| | header { |
| | Access-Control-Allow-Origin "{http.request.header.origin}" |
| | Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS" |
| | Access-Control-Allow-Headers "Origin, Accept, Authorization, Content-Type, X-Requested-With" |
| | Access-Control-Allow-Credentials "true" |
| | Access-Control-Max-Age "3600" |
| | defer |
| | } |
| | respond "" 204 |
| | } |
| |
|
| | @match-cors-api-request { |
| | not { |
| | header Origin "{http.request.scheme}://{http.request.host}" |
| | } |
| | header Origin "{http.request.header.origin}" |
| | } |
| | handle @match-cors-api-request { |
| | header { |
| | Access-Control-Allow-Origin "{http.request.header.origin}" |
| | Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS" |
| | Access-Control-Allow-Headers "Origin, Accept, Authorization, Content-Type, X-Requested-With" |
| | Access-Control-Allow-Credentials "true" |
| | Access-Control-Max-Age "3600" |
| | defer |
| | } |
| | } |
| | } |
| |
|
| | |
| | localhost { |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | handle /api/* { |
| | |
| | import cors-api |
| |
|
| | reverse_proxy localhost:11434 |
| | } |
| |
|
| | |
| | file_server { |
| | root ./build/ |
| | } |
| | } |
| |
|