|
|
@@ -18,8 +18,8 @@ const corsHeaders = {
|
|
|
* - Use X-ShopRenter-Token instead of Authorization to avoid Supabase JWT validation
|
|
|
* 2. Set X-ShopRenter-Shop header with shop name (e.g., "elektromosroller")
|
|
|
* 3. (Optional) Set X-ShopRenter-API-Version header to specify API endpoint:
|
|
|
- * - "api" for api.myshoprenter.hu (default)
|
|
|
- * - "api2" for api2.myshoprenter.hu
|
|
|
+ * - "api2" for api2.myshoprenter.hu (default)
|
|
|
+ * - "api" for api.myshoprenter.hu
|
|
|
* 4. Make requests to: /shoprenter-proxy/api/{endpoint}
|
|
|
*
|
|
|
* All request methods (GET, POST, PUT, PATCH, DELETE) are supported.
|
|
|
@@ -277,8 +277,8 @@ serve(async (req) => {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
- // Get API version from header (default to 'api' for api.myshoprenter.hu)
|
|
|
- const apiVersion = req.headers.get('X-ShopRenter-API-Version') || 'api'
|
|
|
+ // Get API version from header (default to 'api2' for api2.myshoprenter.hu)
|
|
|
+ const apiVersion = req.headers.get('X-ShopRenter-API-Version') || 'api2'
|
|
|
|
|
|
// Validate API version
|
|
|
if (apiVersion !== 'api' && apiVersion !== 'api2') {
|