Skip to content

Commit

Permalink
fix problems
Browse files Browse the repository at this point in the history
  • Loading branch information
gugzkumar committed Dec 31, 2019
1 parent 63f6cee commit b23257d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
14 changes: 13 additions & 1 deletion .aws-infrastructure/lib/CheetSheetNetwork-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,19 @@ export class CheetSheetNetworkStack extends cdk.Stack {
names: [ this.siteHostname ],
sslMethod: cloudfront.SSLMethod.SNI,
securityPolicy: cloudfront.SecurityPolicyProtocol.TLS_V1_1_2016
}
},
errorConfigurations: [
{
errorCode: 403,
responseCode: 200,
responsePagePath: '/index.html'
},
{
errorCode: 404,
responseCode: 200,
responsePagePath: '/index.html'
}
]
});
const targetResource = new targets.CloudFrontTarget(clientUIWebDistribution);

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ API Gateway - Per Transaction
AWS Cognito - Per User

https://github.com/aws-samples/aws-cdk-examples/tree/master/typescript/
https://lucasfsantos.com/posts/deploy-react-angular-cloudfront/
2 changes: 1 addition & 1 deletion api/standup-api.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Starts the API with SAM LOCAL
sam local start-api --skip-pull-image --host 0.0.0.0 -p 3000 -v $SAM_LOCAL_ABSOLUTE_PATH \
--parameter-overrides LayerArn=$LAMBDA_LAYER RoleArn=$LAMBDA_IAM_ROLE SheetDataBucket=$SHEET_DATA_S3_BUCKET \
--parameter-overrides LayerArn=$LAMBDA_LAYER SheetDataBucket=$SHEET_DATA_S3_BUCKET \
CognitoClientId=$COGNITO_CLIENT_ID CognitoJWKSBase64=$COGNITO_JWKS_BASE64
3 changes: 2 additions & 1 deletion client-ui/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const routes: Routes = [
resolve: {
auth: AuthResolver
}
}
},
{ path: '**', redirectTo: '' }
];

@NgModule({
Expand Down
6 changes: 5 additions & 1 deletion client-ui/src/app/core/services/workspace.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,19 @@ export class WorkspaceService {
* Load all available groups
*/
private parseGroups(groups: string[]): Workspace[] {
var indexOfAdminGroup = groups.indexOf(ADMIN_USER_GROUP);
const workspaces: Workspace[] = [];
// Add the Default Personal Workspace
workspaces.push({
name: 'Personal',
displayIcon: WorkspaceIcon.Personal,
displayIconClass: WorkspaceIconClass.Personal
});

if (!groups || groups.length <1)
return workspaces;

// Add the Public Workspace if user belongs to the admin group
var indexOfAdminGroup = groups.indexOf(ADMIN_USER_GROUP);
if(indexOfAdminGroup > -1)
workspaces.push({
name: 'Public',
Expand Down

0 comments on commit b23257d

Please sign in to comment.