mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-25 09:13:07 +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())
|
||||
return {
|
||||
statusCode: result.statusCode,
|
||||
// headers: {
|
||||
// "Access-Control-Allow-Headers" : "Content-Type",
|
||||
// "Access-Control-Allow-Origin": "*",
|
||||
// "Access-Control-Allow-Methods": "GET,HEAD,POST"
|
||||
// },
|
||||
headers: {
|
||||
"Access-Control-Allow-Headers" : "Content-Type",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Access-Control-Allow-Methods": "OPTIONS,POST"
|
||||
},
|
||||
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() {
|
||||
|
||||
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, '/api')
|
||||
setMetadata(login.metadata.AccountsUrl, process.env.APP_ACCOUNTS_URL)
|
||||
|
||||
// if (process.env.CLIENT === 'dev')
|
||||
addLocation(clientId, () => import(/* webpackChunkName: "client-dev" */ '@anticrm/dev-client-resources'))
|
||||
|
@ -152,7 +152,7 @@ module.exports = {
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '[name].css'
|
||||
}),
|
||||
new Dotenv()
|
||||
new Dotenv({path: prod ? '.env-prod' : '.env'})
|
||||
],
|
||||
devtool: prod ? false : 'source-map',
|
||||
devServer: {
|
||||
|
Loading…
Reference in New Issue
Block a user