mirror of
https://github.com/actix/actix-extras.git
synced 2025-08-01 07:51:52 +02:00
Deploying to gh-pages from @ d28ab6eaa1
🚀
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
</span><span class="kw">async fn </span>main() -> std::io::Result<()> {
|
||||
HttpServer::new(|| {
|
||||
<span class="kw">let </span>cors = Cors::default()
|
||||
.allowed_origin(<span class="string">"https://www.rust-lang.org/"</span>)
|
||||
.allowed_origin(<span class="string">"https://www.rust-lang.org"</span>)
|
||||
.allowed_origin_fn(|origin, _req_head| {
|
||||
origin.as_bytes().ends_with(<span class="string">b".rust-lang.org"</span>)
|
||||
})
|
||||
@@ -37,4 +37,4 @@
|
||||
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div>
|
||||
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Cors.html" title="actix_cors::Cors struct">Cors</a></div><div class="item-right docblock-short">Builder for CORS middleware.</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.CorsError.html" title="actix_cors::CorsError enum">CorsError</a></div><div class="item-right docblock-short">Errors that can occur when processing CORS guarded requests.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (432abd86f 2022-09-20)" ></div></body></html>
|
||||
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Cors.html" title="actix_cors::Cors struct">Cors</a></div><div class="item-right docblock-short">Builder for CORS middleware.</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.CorsError.html" title="actix_cors::CorsError enum">CorsError</a></div><div class="item-right docblock-short">Errors that can occur when processing CORS guarded requests.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (9062b780b 2022-09-21)" ></div></body></html>
|
Reference in New Issue
Block a user