-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add back in Cookie Domain support #2432
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,8 +182,12 @@ spec: | |
- name: SKIP_SSL_VALIDATION | ||
value: {{default "true" .Values.uaa.skipSSLValidation | quote}} | ||
{{- end }} | ||
{{- if .Values.env.DOMAIN }} | ||
- name: X_COOKIE_DOMAIN | ||
{{- if .Values.console.cookieDomain }}{{ if ne .Values.console.cookieDomain "-" }} | ||
- name: COOKIE_DOMAIN | ||
value: {{.Values.console.cookieDomain}} | ||
{{- end }} | ||
{{- else if .Values.env.DOMAIN }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
- name: COOKIE_DOMAIN | ||
value: {{.Values.env.DOMAIN}} | ||
{{- end }} | ||
ports: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ dbProvider: mysql | |
useLb: false | ||
console: | ||
port: 443 | ||
cookieDomain: | ||
# externalIP: 127.0.0.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not set this to '-' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because setting it to -would mean we don't pick up from env.DOMAIN |
||
images: | ||
console: stratos-console | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<app-intro-screen> | ||
<mat-card class="domain__card"> | ||
<app-stratos-title></app-stratos-title> | ||
<div class="domain__message"> | ||
<mat-icon>warning</mat-icon> | ||
<span>Domain mismatch</span> | ||
</div> | ||
<div class="domain__detail"> | ||
<p>The URL you are using to access Stratos does not match the configured domain</p> | ||
<p>Please contact your system administrator</p> | ||
</div> | ||
</mat-card> | ||
</app-intro-screen> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.domain { | ||
&__card { | ||
margin: 12px; | ||
padding: 24px 64px; | ||
} | ||
&__message { | ||
align-items: center; | ||
display: flex; | ||
font-size: 18px; | ||
font-weight: 600; | ||
justify-content: center; | ||
padding: 32px 48px 0; | ||
text-align: center; | ||
span { | ||
margin-left: 12px; | ||
} | ||
} | ||
&__detail { | ||
font-size: 16px; | ||
padding: 24px 0 32px; | ||
text-align: center; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { DomainMismatchComponent } from './domain-mismatch.component'; | ||
import { MDAppModule } from '../../../core/md.module'; | ||
import { IntroScreenComponent } from '../../../shared/components/intro-screen/intro-screen.component'; | ||
import { StratosTitleComponent } from '../../../shared/components/stratos-title/stratos-title.component'; | ||
|
||
describe('DomainMismatchComponent', () => { | ||
let component: DomainMismatchComponent; | ||
let fixture: ComponentFixture<DomainMismatchComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ DomainMismatchComponent, IntroScreenComponent, StratosTitleComponent ], | ||
imports: [ | ||
MDAppModule, | ||
] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(DomainMismatchComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-domain-mismatch', | ||
templateUrl: './domain-mismatch.component.html', | ||
styleUrls: ['./domain-mismatch.component.scss'] | ||
}) | ||
export class DomainMismatchComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both
if
s can be mergedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@irfanhabib - The logic I want is: if cookieDomain is set, use it, unless it is set to '-' in which case do not set it, otherwise default to env.DOMAIN - I don't think what you propose will do that.