Skip to content
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

DEPLOY: autocomplete resolution for deployement #248

Merged
merged 1 commit into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ docker-compose.yml
docker-compose-dev.yml

Procfile*
ui/node_modules
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ RUN chown -R invenio:invenio ${WORKING_DIR}
USER 1000

ENV INVENIO_COLLECT_STORAGE='flask_collect.storage.file'
RUN ./scripts/bootstrap --deploy
RUN ./scripts/bootstrap --deploy && rm -fr ui/node_modules

3 changes: 0 additions & 3 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,3 @@ RUN useradd invenio --uid 1000 --home ${WORKING_DIR} && \
chmod -R go+w ${WORKING_DIR}

USER 1000

ENV INVENIO_COLLECT_STORAGE='flask_collect.storage.file'
RUN ./scripts/bootstrap
15 changes: 7 additions & 8 deletions rero_ils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,12 @@ def _(x):
MAX_CONTENT_LENGTH = 100 * 1024 * 1024 # 100 MiB
#: For dev. Set to false when testing on localhost in no debug mode
APP_ENABLE_SECURE_HEADERS = True

# TODO: review theses rules for security purposes
APP_DEFAULT_SECURE_HEADERS = {
'force_https': True,
# disabled as https is not used by the application:
# https is done by the haproxy
'force_https': False,
'force_https_permanent': False,
'force_file_save': False,
'frame_options': 'sameorigin',
Expand All @@ -239,7 +243,7 @@ def _(x):
'strict_transport_security_include_subdomains': True,
'content_security_policy': {
'default-src': ['*'],
# 'default-src': ["'self'"],
'style-src': ['*', "'unsafe-inline'"],
'script-src': [
"'self'",
"'unsafe-inline'",
Expand All @@ -248,12 +252,7 @@ def _(x):
'https://www.google-analytics.com',
'https://services.test.rero.ch',
'https://services.rero.ch'
],
# 'img-src': [
# "'self'",
# 'https://www.google-analytics.com',
# 'http://images.amazon.com'
# ]
]
},
'content_security_policy_report_uri': None,
'content_security_policy_report_only': False,
Expand Down
1 change: 0 additions & 1 deletion ui/src/app/autocomplete/autocomplete.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ export class AutocompleteComponent implements OnInit {

getPersonName(metadata) {
for (const source of ['rero', 'bnf', 'gnd']) {
console.log(source);
if (metadata[source] && metadata[source].preferred_name_for_person) {
return metadata[source].preferred_name_for_person;
}
Expand Down