Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy Support #165

Closed
stikkireddy opened this issue Jan 25, 2024 · 1 comment
Closed

Proxy Support #165

stikkireddy opened this issue Jan 25, 2024 · 1 comment

Comments

@stikkireddy
Copy link

I am running my fastapi behind a proxy. The issue I am running into:
assume my path is https://example.com/proxy/8989/

  1. the root path is invoked
  2. the HTMLResponse(prebuilt_html(title='FastUI Demo')) is sent
  3. the following content is run
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>FastUI Demo</title>
    <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@pydantic/[email protected]/dist/assets/index.js"></script>
    <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@pydantic/[email protected]/dist/assets/index.css">
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>
  1. The index.js is installed
  2. Then it makes an fetch call with the react js being loaded to https://example.com/api/proxy/8989/ instead of https://example.com/proxy/8989/api/

Is this expected? Any plans on fixing it?

@samuelcolvin
Copy link
Member

I think this is a duplicate of #134, LMK if that's not the case and we can reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants