File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,16 @@ async fn main() -> io::Result<()> {
5757 HttpServer :: new ( move || {
5858 App :: new ( )
5959 . wrap ( Cors :: default ( ) // allowed_origin return access-control-allow-origin: * by default
60- // .allowed_origin("http://127.0.0.1:8080")
60+ . allowed_origin ( "http://127.0.0.1:3000" )
61+ . allowed_origin ( "http://localhost:3000" )
6162 . send_wildcard ( )
6263 . allowed_methods ( vec ! [ "GET" , "POST" , "PUT" , "DELETE" ] )
6364 . allowed_headers ( vec ! [ http:: header:: AUTHORIZATION , http:: header:: ACCEPT ] )
6465 . allowed_header ( http:: header:: CONTENT_TYPE )
6566 . max_age ( 3600 ) )
6667 . data ( pool. clone ( ) )
6768 . wrap ( actix_web:: middleware:: Logger :: default ( ) )
69+ // If you want to use yew-address-book-frontend, please comment an auth_middleware wrapping code
6870 . wrap ( crate :: middleware:: auth_middleware:: Authentication )
6971 . wrap_fn ( |req, srv| {
7072 srv. call ( req) . map ( |res| res)
You can’t perform that action at this time.
0 commit comments