Skip to content
Discussion options

You must be logged in to vote

Hi, yes this is possible to do with YARP.

Call YARP from within the static Blazor WASM client with the full request ( + ) the Twitter API v2 needs.

As long as the browser can make an HTTP request to it, YARP doesn't care that it came from a Blazor browser app.

YARP adds the Access-Control-Allow-Origin header to the response.

I would recommend you take a look at the minimal sample.

The only modification you should need is to the config file.
You must specify the correct destination, and add a Transform that adds the header.

Your config may look something like

"ReverseProxy": {
  "Routes": {
    "catchAllRoute": {
      "ClusterId": "twitterCluster",
      "Match": {
        "Path": "{*…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@JeepNL
Comment options

@MihaZupan
Comment options

@JeepNL
Comment options

@JeepNL
Comment options

@JeepNL
Comment options

Answer selected by JeepNL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants