mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-25 19:58:30 +03:00
fix lambda CORS
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
ce348f1a92
commit
67940e0d35
@ -106,11 +106,11 @@ const api = new awsx.apigateway.API("login", {
|
|||||||
const result = handle(body, serverEndpoint.get())
|
const result = handle(body, serverEndpoint.get())
|
||||||
return {
|
return {
|
||||||
statusCode: result.statusCode,
|
statusCode: result.statusCode,
|
||||||
// headers: {
|
headers: {
|
||||||
// "Access-Control-Allow-Headers" : "Content-Type",
|
"Access-Control-Allow-Headers" : "Content-Type",
|
||||||
// "Access-Control-Allow-Origin": "*",
|
"Access-Control-Allow-Origin": "*",
|
||||||
// "Access-Control-Allow-Methods": "GET,HEAD,POST"
|
"Access-Control-Allow-Methods": "OPTIONS,POST"
|
||||||
// },
|
},
|
||||||
body: result.body
|
body: result.body
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
3
dev/prod/.env-prod
Normal file
3
dev/prod/.env-prod
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
APP_ACCOUNTS_URL=https://ftwm71rwag.execute-api.us-west-2.amazonaws.com/stage/
|
@ -36,8 +36,10 @@ import { setMetadata } from '@anticrm/platform'
|
|||||||
|
|
||||||
export function configurePlatform() {
|
export function configurePlatform() {
|
||||||
|
|
||||||
|
console.log(process.env.APP_ACCOUNTS_URL)
|
||||||
|
|
||||||
// setMetadata(login.metadata.AccountsUrl, 'https://ftwm71rwag.execute-api.us-west-2.amazonaws.com/stage/')
|
// setMetadata(login.metadata.AccountsUrl, 'https://ftwm71rwag.execute-api.us-west-2.amazonaws.com/stage/')
|
||||||
setMetadata(login.metadata.AccountsUrl, '/api')
|
setMetadata(login.metadata.AccountsUrl, process.env.APP_ACCOUNTS_URL)
|
||||||
|
|
||||||
// if (process.env.CLIENT === 'dev')
|
// if (process.env.CLIENT === 'dev')
|
||||||
addLocation(clientId, () => import(/* webpackChunkName: "client-dev" */ '@anticrm/dev-client-resources'))
|
addLocation(clientId, () => import(/* webpackChunkName: "client-dev" */ '@anticrm/dev-client-resources'))
|
||||||
|
@ -152,7 +152,7 @@ module.exports = {
|
|||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: '[name].css'
|
filename: '[name].css'
|
||||||
}),
|
}),
|
||||||
new Dotenv()
|
new Dotenv({path: prod ? '.env-prod' : '.env'})
|
||||||
],
|
],
|
||||||
devtool: prod ? false : 'source-map',
|
devtool: prod ? false : 'source-map',
|
||||||
devServer: {
|
devServer: {
|
||||||
|
Loading…
Reference in New Issue
Block a user