Skip to content

Commit ab5b6bb

Browse files
committed
ENGAGE-243
1 parent 54db5cb commit ab5b6bb

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/app/core/xsrf/xsrf-fallback.interceptor.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ declare const runtimeEnvironment: any
1717
* support (configured via withXsrfConfiguration) does not attach the header,
1818
* especially when using the local proxy setup.
1919
*
20+
* Only active when not in production (local development runs).
21+
*
2022
* Behaviour:
2123
* - For mutating backend calls (POST/PUT/PATCH/DELETE) to ORCID web APIs:
2224
* - If an XSRF header is already present, do nothing.
@@ -32,6 +34,11 @@ export class XsrfFallbackInterceptor implements HttpInterceptor {
3234
req: HttpRequest<any>,
3335
next: HttpHandler
3436
): Observable<HttpEvent<any>> {
37+
// Only apply fallback in local development (e.g. proxy / same-origin dev)
38+
if (runtimeEnvironment.production) {
39+
return next.handle(req)
40+
}
41+
3542
const method = req.method.toUpperCase()
3643

3744
// Only care about mutating requests

src/app/record/components/search-link-wizard/search-link-wizard.component.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ <h2 class="orc-font-body-small">
1616
</span>
1717
</h2>
1818
<p class="orc-font-body-small">
19-
<ng-container *ngIf="(recordImportWizard.description || recordImportWizard.redirectUriMetadata?.defaultDescription || '').length > 125">
19+
<ng-container *ngIf="(recordImportWizard.description || '').length > 125">
2020
<ng-container *ngIf="!recordImportWizard.show">
21-
{{ (recordImportWizard.description || recordImportWizard.redirectUriMetadata?.defaultDescription || '').substring(0, 125) + '...' }}
21+
{{ (recordImportWizard.description || '').substring(0, 125) + '...' }}
2222
<a
2323
class="underline"
2424
i18n="@@shared.showMore"
@@ -28,7 +28,7 @@ <h2 class="orc-font-body-small">
2828
</a>
2929
</ng-container>
3030
<ng-container *ngIf="recordImportWizard.show">
31-
{{ recordImportWizard.description || recordImportWizard.redirectUriMetadata?.defaultDescription || '' }}
31+
{{ recordImportWizard.description || '' }}
3232
<br />
3333
<a
3434
class="underline"
@@ -39,8 +39,8 @@ <h2 class="orc-font-body-small">
3939
</a>
4040
</ng-container>
4141
</ng-container>
42-
<ng-container *ngIf="(recordImportWizard.description || recordImportWizard.redirectUriMetadata?.defaultDescription || '').length <= 125">
43-
{{ recordImportWizard.description || recordImportWizard.redirectUriMetadata?.defaultDescription || '' }}
42+
<ng-container *ngIf="(recordImportWizard.description || '').length <= 125">
43+
{{ recordImportWizard.description || '' }}
4444
</ng-container>
4545
</p>
4646
</div>

src/app/types/record-peer-review-import.endpoint.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export interface RecordImportWizard {
2424

2525
/**
2626
* Response shape from GET workspace/retrieve-works-search-and-link-wizard.json.
27-
* Uses "connected" (JSON) instead of "isConnected".
2827
*/
2928
export interface SearchAndLinkWizardFormSummaryResponse {
3029
id: string

0 commit comments

Comments
 (0)