Ivanyan 🌴
Ivanyan 🌴
Explore posts from servers
RRailway
Created by Ivanyan 🌴 on 5/19/2024 in #βœ‹ο½œhelp
CORS issue calling to railway from other domain
Project ID : b1d6fa08-43ff-4114-82f0-f836e0ee2651 Hi, I'm getting this error when trying to call from my frontend to Flask backend server hosted on Railway: Access to fetch at 'http://c...pp/1980' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request. Here is my flask server looks like: ------------------ SETUP ------------------ load_dotenv() app = Flask(__name__) # this will need to be reconfigured before taking the app to production cors = CORS(app, resources={r"/*": {"origins": ["http://localhost", "http://localhost:3000", "http://c...pp"]}}) ... # ------------------ START SERVER ------------------ if __name__ == '__main__': app.run(debug=True, port=os.getenv("PORT", default=5000)) Do you have any suggestion? Anyway, thank you for building amazing railway!
10 replies
PD🧩 Plasmo Developers
Created by Ivanyan 🌴 on 5/4/2024 in #πŸ”°newbie
Can not render react component inside Overlay
I am trying to render a component from deepchat.dev in the overlay to make a floating chat box, but it ends up showing no overlay at all. I tried to render the component alone, inside the span,... but it didn't work and inspecting shows no CSUI has been rendered. However, when I remove the <DeepChat> component, the span is rendered fine. The <DeepChat> component works perfectly fine in the pop-up, the bug happens only on CSUI Anyone encountered this before? const PlasmoOverlay = () => { return ( <span className="hw-top"> CSUI OVERLAY FIXED POSITION <DeepChat demo={true} style={{ borderRadius: '10px' }} textInput={{ placeholder: { text: 'Welcome to the demo!' } }} initialMessages={initialMessages} /> <h1>Deep Chat</h1> </span> ) }
3 replies