correct proxy handling, add proxy to README, fix object locked issues (#407)

Co-authored-by: Christopher Oliphant <RALifeCoach@users.noreply.github.com>
This commit is contained in:
FromTheLOLAshesandChristopher Oliphant authored and GitHub committed 2024-05-21 13:06:21 -04:00
1 parent 7b9df0ec96
commit 00383db9fa
8 files changed
+27 -16

No files matched your search

+4 -5
View File
@@ -1,5 +1,4 @@
BASE_API="https://api.storyteller.ai"
GOOGLE_API="https://storage.googleapis.com"
FUNNEL_API="https://style.storyteller.ai"
CDN_API="https://cdn.storyteller.ai"
EXPRESSIONS="true"
BASE_API="http://localhost:3000"
GOOGLE_API="http://localhost:3000/google"
FUNNEL_API="http://localhost:3000/funnel"
CDN_API="http://localhost:3000/cdn"
+5
View File
@@ -0,0 +1,5 @@
BASE_API="https://api.storyteller.ai"
GOOGLE_API="https://storage.googleapis.com"
FUNNEL_API="https://style.storyteller.ai"
CDN_API="https://cdn.storyteller.ai"
EXPRESSIONS="true"
-4
View File
@@ -1,4 +0,0 @@
BASE_API="http://localhost:3000"
GOOGLE_API="http://localhost:3000/google"
FUNNEL_API="http://localhost:3000/funnel"
CDN_API="http://localhost:3000/cdn"
+6
View File
@@ -19,6 +19,12 @@ if (condition) {
No use of any type.
If you can use chat gpt to create the interface.
```
# Local Testing
use the .env file that directs all requests to localhost:3000
from folder /proxy run
```node proxy.js```
# IF YOU ARE WORKING ON THIS PROJECT PLEASE ASK THE TEAM MEMBERS HOW TO SET UP THIS IS OUTDATED INFORMATION
# GottaGoFast-SS
+2 -6
View File
@@ -2,10 +2,6 @@ import { environmentVariables, authentication } from "~/signals";
type UrlRoutingFunction<UrlRouteArgs> = (urlRouteArgs: UrlRouteArgs) => string;
interface RequestHeaders {
[name: string]: string;
}
interface RouteSetup<UrlRouteArgs> {
method: string;
multipart?: boolean;
@@ -54,7 +50,7 @@ const MakeRequest = <UrlRouteArgs, Request, Response, UrlParams>(
...(methodOmitsBody ? {} : { "Content-Type": "application/json" }),
session: sessionToken.value || "",
},
credentials: "include",
// credentials: "include",
...(methodOmitsBody ? {} : { body: JSON.stringify(request) }),
})
.then((res) => res.json())
@@ -65,7 +61,7 @@ const MakeRequest = <UrlRouteArgs, Request, Response, UrlParams>(
return res;
} else Promise.reject();
})
.catch((e) => ({ success: false }));
.catch(() => ({ success: false }));
};
};
@@ -12,6 +12,7 @@ interface InputVectorProps {
z: string;
onChange: (v: Record<string, string>) => void;
increment?: number;
disabled?: boolean;
}
export const InputVector = ({
@@ -20,6 +21,7 @@ export const InputVector = ({
z,
onChange,
increment = 0.1,
disabled,
}: InputVectorProps) => {
const xRef = useRef<HTMLInputElement>(null);
const yRef = useRef<HTMLInputElement>(null);
@@ -135,6 +137,7 @@ export const InputVector = ({
onChange={handleOnChange}
ref={xRef}
value={x}
disabled={disabled}
onFocus={() => {
disableHotkeyInput(DomLevels.INPUT);
}}
@@ -156,6 +159,7 @@ export const InputVector = ({
onChange={handleOnChange}
ref={yRef}
value={y}
disabled={disabled}
onFocus={() => {
disableHotkeyInput(DomLevels.INPUT);
}}
@@ -177,6 +181,7 @@ export const InputVector = ({
onChange={handleOnChange}
ref={zRef}
value={z}
disabled={disabled}
onFocus={() => {
disableHotkeyInput(DomLevels.INPUT);
}}
@@ -281,6 +281,7 @@ export const ControlPanelSceneObject = () => {
}}
type="color"
value={color}
disabled={locked}
/>
<Button
className="cursor-pointer p-3.5"
@@ -297,6 +298,7 @@ export const ControlPanelSceneObject = () => {
y={localPosition.y.toString()}
z={localPosition.z.toString()}
onChange={handlePositionChange}
disabled={locked}
/>
</div>
@@ -308,6 +310,7 @@ export const ControlPanelSceneObject = () => {
z={localRotation.z.toString()}
onChange={handleRotationChange}
increment={1}
disabled={locked}
/>
</div>
@@ -318,6 +321,7 @@ export const ControlPanelSceneObject = () => {
y={localScale.y.toString()}
z={localScale.z.toString()}
onChange={handleScaleChange}
disabled={locked}
/>
</div>
</Transition>
+1 -1
View File
@@ -49,7 +49,7 @@ app.use(
app.use(
"/cdn",
createProxyMiddleware({
target: "https://cdn.fakeyou.com",
target: "https://cdn.storyteller.ai",
changeOrigin: true,
secure: true,
logger: console,