-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update nextjs example to use newer eval endpoints (#2207)
- Loading branch information
1 parent
9fccdbc
commit dd47bb4
Showing
8 changed files
with
2,120 additions
and
1,332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
{ | ||
|
||
} | ||
|
||
(cors) { | ||
@cors_preflight method OPTIONS | ||
@cors header Origin {args.0} | ||
@cors_preflight method OPTIONS | ||
@cors header Origin {args.0} | ||
|
||
handle @cors_preflight { | ||
header Access-Control-Allow-Origin "{args.0}" | ||
header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE" | ||
header Access-Control-Allow-Headers "Content-Type" | ||
header Access-Control-Max-Age "3600" | ||
respond "" 204 | ||
} | ||
handle @cors_preflight { | ||
header Access-Control-Allow-Origin "{args.0}" | ||
header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE" | ||
header Access-Control-Allow-Headers "*" | ||
header Access-Control-Max-Age "3600" | ||
respond "" 204 | ||
} | ||
|
||
handle @cors { | ||
header Access-Control-Allow-Origin "{args.0}" | ||
header Access-Control-Expose-Headers "Link" | ||
} | ||
handle @cors { | ||
header Access-Control-Allow-Origin "{args.0}" | ||
header Access-Control-Expose-Headers "Link" | ||
} | ||
} | ||
|
||
:8081 { | ||
log | ||
import cors * | ||
log | ||
import cors * | ||
|
||
# proxy only evaluate requests to port 8080 | ||
reverse_proxy /api/v1/evaluate flipt:8080 { | ||
# optionally add the Authorization header to the proxied request | ||
# header_up Authorization "Bearer {env.FLIPT_API_KEY}" | ||
} | ||
# proxy only evaluate requests to port 8080 | ||
reverse_proxy /evaluate/v1/* flipt:8080 { | ||
# optionally add the Authorization header to the proxied request | ||
# header_up Authorization "Bearer {env.FLIPT_API_KEY}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.