August 2024 Summaries
2 posts from Convex
Filter
Month:
Year:
Post Summaries
Back to Blog
Cross-Origin Resource Sharing (CORS) is a vital yet often misunderstood concept in web development that facilitates the secure exchange of resources between different domains, overcoming the limitations of the Same Origin Policy (SOP) that previously restricted such interactions. While CORS allows for the specification of which origins can access resources through HTTP headers, it's crucial to understand that it is not a security measure that prevents unauthorized access but rather a relaxation of SOP to enable legitimate cross-origin requests. Implementing CORS involves configuring server headers to manage which origins, methods, and headers are permitted, with special considerations required for requests involving credentials or multiple origins. Developers can manually set up CORS or use libraries to simplify the process, especially in complex scenarios. By understanding CORS, developers can build flexible, secure web applications that leverage microservices architectures and third-party APIs, enhancing user experiences. The article also emphasizes the importance of testing CORS configurations and staying updated with best practices to maintain secure and efficient web applications.
Aug 27, 2024
2,451 words in the original blog post.
The blog post provides a guide on testing authenticated functions in the Convex dashboard using the "Act as a user" feature, which allows developers to simulate user identities by passing in fake or decoded JWT values. It explains the process of obtaining a JWT from the browser, decoding its fields using tools like jwt.io, and configuring the dashboard to mimic a user's identity using fields such as "subject" and "issuer". It discusses the flexibility of Convex Auth, which can issue and validate its own JWTs, and provides examples of how to set up the identity fields for testing purposes, emphasizing the importance of understanding JWT structures for accurate function testing. The post concludes by inviting readers to provide feedback and highlights Convex as a comprehensive backend platform for building full-stack AI projects.
Aug 09, 2024
816 words in the original blog post.