Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (1940)
Showing with 19685 additions and 6066 deletions
VUE_APP_ODA_PROD = 'https://oda.uib.no/opal/prod/'
VUE_APP_ODA_DEV = 'https://oda.uib.no/opal/dev/'
VUE_APP_ODD_PROD = 'https://odd.uib.no/opal/prod/'
VUE_APP_ODD_DEV = 'https://odd.uib.no/opal/dev/'
VUE_APP_IDA_DEV = 'https://ida.uib.no/opal/dev/'
VUE_APP_IDA_PROD = 'https://ida.uib.no/opal/prod/'
\ No newline at end of file
NODE_ENV=production
VUE_APP_ENDPOINT='odd_prod'
VUE_APP_FALLBACK_ENDPOINT='odd_dev'
VUE_APP_VERSION_LABEL=DEVELOPMENT
VUE_APP_ENDPOINT='odd_prod'
VUE_APP_FALLBACK_ENDPOINT='odd_dev'
VUE_APP_VERSION_LABEL=LOCAL
VUE_APP_RELEASE=test
NODE_ENV=production
VUE_APP_VERSION_LABEL=Prod
VUE_APP_ENDPOINT='oda_prod'
VUE_APP_FALLBACK_ENDPOINT='odd_prod'
...@@ -3,8 +3,8 @@ node_modules ...@@ -3,8 +3,8 @@ node_modules
/dist /dist
# local env files # local env files
.env.local #.env.local
.env.*.local #.env.*.local
# Log files # Log files
npm-debug.log* npm-debug.log*
...@@ -19,3 +19,6 @@ yarn-error.log* ...@@ -19,3 +19,6 @@ yarn-error.log*
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
*.iml
...@@ -2,32 +2,109 @@ stages: ...@@ -2,32 +2,109 @@ stages:
- build - build
- deploy - deploy
build: workflow:
image: node:latest rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_COMMIT_TAG == null'
when: never
- if: '$CI_COMMIT_BRANCH'
- if: $CI_COMMIT_TAG != null
build-dev:
image: node:16
tags:
- group_runner_spraaksamlingene_01
stage: build stage: build
only: rules:
- master - if: $CI_COMMIT_TAG != null
when: never
- if: $CI_COMMIT_REF_NAME == 'prod'
when: manual
- when: on_success
script: script:
- |-
if [[ $CI_PIPELINE_SOURCE == "merge_request_event" ]]; then
echo "VUE_APP_RELEASE=MERGE $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME ($CI_COMMIT_SHORT_SHA)" >> .env.dev_server
else
echo "VUE_APP_RELEASE=BRANCH $CI_COMMIT_BRANCH ($CI_COMMIT_SHORT_SHA)" >> .env.dev_server
fi
- npm install --progress=false - npm install --progress=false
- npm run build - npm run build -- --mode dev_server
- 'echo -e "\nDisallow: /" >> dist/robots.txt'
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
- dist - dist
deploy: build-prod:
image: node:16
tags:
- group_runner_spraaksamlingene_01
stage: build
only:
- /^release_.*$/
script:
- echo "VUE_APP_RELEASE=$CI_COMMIT_REF_NAME" >> .env.production
- npm install --progress=false
- npm run build -- --mode production
artifacts:
expire_in: 1 week
paths:
- dist
.build-sitemap:
tags:
- group_runner_spraaksamlingene_01
image: "python:3.9"
stage: "build"
script:
- curl "https://ord.uib.no/bm/fil/lemma.json" > "bm_lemma.json"
- curl "https://ord.uib.no/nn/fil/lemma.json" > "nn_lemma.json"
- python3 src/sitemap/sitemap.py
artifacts:
expire_in: 1 week
paths:
- src/sitemap/xml
build-sitemap-dev:
extends: .build-sitemap
when: manual
build-sitemap-prod:
extends: .build-sitemap
needs: [build-prod]
only:
- /^release_.*$/
deploy-dev:
image: uibit/awscli:latest image: uibit/awscli:latest
tags:
- group_runner_spraaksamlingene_01
stage: deploy stage: deploy
only: rules:
- master - if: $CI_COMMIT_TAG != null
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_PIPELINE_SOURCE == 'merge_request_event'
when: on_success
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != 'merge_request_event'
when: manual
script: script:
- rm -rf ~/.aws - rm -rf ~/.aws
- mv .aws ~/ - mv .aws ~/
- STACK_NAME=ordbok-frontend-beta - export AWS_ACCESS_KEY_ID=$AWS_DEV_ACCESS_KEY_ID
- CERT_ARN=arn:aws:acm:us-east-1:${AWS_ACCOUNT}:certificate/c7078026-d634-462b-86b4-1a6d33ac6d53 - export AWS_SECRET_ACCESS_KEY=$AWS_DEV_SECRET_ACCESS_KEY
- STACK_NAME=ordbok-frontend-dev
- CERT_ARN=arn:aws:acm:us-east-1:${AWS_DEV_ACCOUNT}:certificate/15c0111e-b2f7-4a24-8c94-b7034a900d55
- aws cloudformation deploy --stack-name ${STACK_NAME} - aws cloudformation deploy --stack-name ${STACK_NAME}
--template-file "aws/beta.ordbok.uib.no_stack.yaml" --template-file "aws/beta.ordbok.uib.no_stack.yaml"
--parameter-overrides "CertificateArn=${CERT_ARN}" --parameter-overrides "CertificateArn=${CERT_ARN}"
"AltDomainName=dev.ordbok.uib.no"
"DomainName=beta.ordbok-dev.aws.uib.no"
"ZoneDomainName=ordbok-dev.aws.uib.no"
"PathRewriteLambdaARN=arn:aws:lambda:us-east-1:${AWS_DEV_ACCOUNT}:function:rewrite_request:12"
"OrdbokCacheOriginDomain=8mwl23g34a.execute-api.eu-west-1.amazonaws.com"
"OrdbokCacheStage=DEV"
--no-fail-on-empty-changeset --no-fail-on-empty-changeset
--capabilities CAPABILITY_IAM --capabilities CAPABILITY_IAM
- aws s3 rm "s3://${STACK_NAME}.aws.uib.no" --recursive - aws s3 rm "s3://${STACK_NAME}.aws.uib.no" --recursive
...@@ -38,3 +115,35 @@ deploy: ...@@ -38,3 +115,35 @@ deploy:
--logical-resource-id Distribution --logical-resource-id Distribution
--query 'StackResourceDetail.PhysicalResourceId' | jq -r) --query 'StackResourceDetail.PhysicalResourceId' | jq -r)
- aws cloudfront create-invalidation --distribution-id ${DISTRO_ID} --paths "/*" - aws cloudfront create-invalidation --distribution-id ${DISTRO_ID} --paths "/*"
deploy-prod:
image: uibit/awscli:latest
tags:
- group_runner_spraaksamlingene_01
stage: deploy
only:
- /^release_.*$/
script:
- cp src/sitemap/xml/* dist
- rm -rf ~/.aws
- mv .aws ~/
- export AWS_ACCESS_KEY_ID=$AWS_PROD_ACCESS_KEY_ID
- export AWS_SECRET_ACCESS_KEY=$AWS_PROD_SECRET_ACCESS_KEY
- STACK_NAME=ordbok-frontend-beta
- CERT_ARN=arn:aws:acm:us-east-1:${AWS_PROD_ACCOUNT}:certificate/c7078026-d634-462b-86b4-1a6d33ac6d53
- aws cloudformation deploy --stack-name ${STACK_NAME}
--template-file "aws/beta.ordbok.uib.no_stack.yaml"
--parameter-overrides "CertificateArn=${CERT_ARN}"
"PathRewriteLambdaARN=arn:aws:lambda:us-east-1:${AWS_PROD_ACCOUNT}:function:path_rewrite:18"
"OrdbokCacheOriginDomain=n5speug9cl.execute-api.eu-west-1.amazonaws.com"
"OrdbokCacheStage=PROD"
--no-fail-on-empty-changeset
--capabilities CAPABILITY_IAM
- aws s3 rm "s3://${STACK_NAME}.aws.uib.no" --recursive
- aws s3 sync dist/ "s3://${STACK_NAME}.aws.uib.no" --delete
- aws s3 sync api_static/ "s3://${STACK_NAME}.aws.uib.no"
- DISTRO_ID=$(aws cloudformation describe-stack-resource
--stack-name ${STACK_NAME}
--logical-resource-id Distribution
--query 'StackResourceDetail.PhysicalResourceId' | jq -r)
- aws cloudfront create-invalidation --distribution-id ${DISTRO_ID} --paths "/*"
Contributing
============
Changes are published using GitLab CI/CD. When making a change:
1. Test any changes to the frontend locally by runniing `npm run install` (if necessary) and `npm run serve`
2. Push changes to GitLab. When pipeline is finished, your changes will be visible on https://dev.ordbok.uib-no (check browser cache)
3. To publish your changes to beta, add a tag to your commit that starts with `release`, e.g. `release_2021-01-01`. When the pipeline finishes, changes up to that commit will be visible on https://beta.ordbok.uib.no
...@@ -27,3 +27,16 @@ npm run lint ...@@ -27,3 +27,16 @@ npm run lint
### Customize configuration ### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/). See [Configuration Reference](https://cli.vuejs.org/config/).
### Universell utforming
Nettsiden kan brukes med en skjermleser. Man kan navigere gjennom siden med Tab. Pileknapper må brukes for å navigere mellom
radioknapper ved valget av målformen og ved navigeringen opp/ned i dropdown-menyen i søkefeltet. Det finnes en ekspress-navigasjon
til søkefeltet, men snarveien kan være forskjellig avhengig av nettleseren og operativsystemet. "Nøkkelbokstav" er "s": f.eks,
på Linux er det alt+s i Chrome og shift+alt+s i Firefox. En full oversikt over flere nettlesere og OS finnes i en tabell
her https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey
### Workflow
Create a merge request and merge your branch into master if and only if the issue is tagged as ready for prod.
Before submitting the merge request, you must pull any changes from the master branch, resolve merge conflicts and test the result on the dev server.
Deployment to dev server is now accessible on all branches. You can re-run deploy-dev without build-dev to deploy a particular branch to dev (within
the expiry date of 1 week).
\ No newline at end of file
This diff is collapsed.
...@@ -23,9 +23,6 @@ div#main { ...@@ -23,9 +23,6 @@ div#main {
text-align: center; text-align: center;
} }
a {
text-decoration: none;
}
a img { a img {
...@@ -51,18 +48,11 @@ p { ...@@ -51,18 +48,11 @@ p {
<div id="main"> <div id="main">
<h1>Ordbok-API</h1> <h1>Ordbok-API</h1>
<h3>Hva er dette?</h3> <h3>Hva er dette?</h3>
<p>Gjennom denne tjenesten kan man gjøre oppslag i alle ord registrert i Bokmåls- og Nynorskordboka. Man trenger en API-nøkkel for å bruke tjenesten. Denne sendes ut <p>Gjennom denne ord.uib.no kan man gjøre oppslag i alle ord registrert i Bokmåls- og Nynorskordboka. Vi tilbyr foreløpig interaktiv dokumentasjon på engelsk og en mer omfattende brukerveiledning på norsk.
etter avtale, kontakt <a href="mailto:ordbokene@uib.no">ordbokene@uib.no</a> for mer informasjon. API-et er todelt, en åpen del som kan brukes av alle som har en API-nøkkel,
og en lukket del for redigering som kun er tilgjengelig for godkjente redaktører.
</p> </p>
<h3>Hva kan du forvente av denne tjenesten?</h3>
<p>Tjenesten er foreløpig i Beta. Selv om vi etterstreber å gjøre alle endringer inkrementelle vil det kunne forekomme strukturelle endringer i denne fasen.</p>
<p>Tjenesten er overvåket innenfor vanlig arbeidstid, og vil normalt være tilgjengelig hele døgnet. Dersom tjenesten skulle bli utilgjengelig på ettermiddag eller kveld
vil dette blir løst så fort som mulig neste arbeidsdag.</p>
<div id="link-container"> <div id="link-container">
<div class="link"><a target="_blank" href ="/api/swagger-ui.html"><img src="https://unpkg.com/swagger-ui-dist@3.23.5/favicon-32x32.png"> Utforsk REST-API-en</a></div> <div class="link"> <a href="https://ord.uib.no/">Brukerveiledning</a> </div>
<div class="link"> <a href="/api/guide.html">Brukerveiledning</a> </div> <div class="link"><a target="_blank" href ="/api/swagger-ui.html"><img src="https://unpkg.com/swagger-ui-dist@3.23.5/favicon-32x32.png" aria-hidden="true"> Explore the REST-API</a></div>
<div class="link"><a href="https://git.app.uib.no/spraksamlingane/api.ordbok.uib.no/-/blob/master/resources/swagger.json">Intern API</a> (velg den absolutte URLen fra menyen "servers")</div>
</div> </div>
</div> </div>
<div> </div> <div> </div>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Swagger UI</title> <title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@3.33.0/swagger-ui.css" > <link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@4/swagger-ui.css" >
<link rel="icon" type="image/png" href="https://unpkg.com/swagger-ui-dist@3.33.0/favicon-32x32.png" sizes="32x32" /> <link rel="icon" type="image/png" href="https://unpkg.com/swagger-ui-dist@4/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="https://unpkg.com/swagger-ui-dist@3.33.0/favicon-16x16.png" sizes="16x16" /> <link rel="icon" type="image/png" href="https://unpkg.com/swagger-ui-dist@4/favicon-16x16.png" sizes="16x16" />
<style> <style>
html html
{ {
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
<body> <body>
<div id="swagger-ui"></div> <div id="swagger-ui"></div>
<script src="https://unpkg.com/swagger-ui-dist@3.33.0/swagger-ui-bundle.js" charset="UTF-8"> </script> <script src="https://unpkg.com/swagger-ui-dist@4/swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="https://unpkg.com/swagger-ui-dist@3.33.0/swagger-ui-standalone-preset.js" charset="UTF-8"> </script> <script src="https://unpkg.com/swagger-ui-dist@4/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script> <script>
window.onload = function() { window.onload = function() {
// Begin Swagger UI call region // Begin Swagger UI call region
const ui = SwaggerUIBundle({ const ui = SwaggerUIBundle({
url: "./swagger.json", url: "./swagger.yml",
dom_id: '#swagger-ui', dom_id: '#swagger-ui',
deepLinking: true, deepLinking: true,
presets: [ presets: [
......
{
"openapi": "3.0.1",
"info": {
"title": "Ordbok API",
"description": "This API is developed by the University of Bergen. Its purpose is to serve the new national dictionary website wich is under development. API keys are available upon request. No warranty.",
"version": "beta"
},
"servers": [
{
"url": "/api"
}
],
"paths": {
"/dict/{dict_id}": {
"get": {
"summary": "Dictionary metadata",
"description": "Returns metadata for a dictionary, including all entities used in article text",
"parameters": [
{
"name": "dict_id",
"in": "path",
"required": true,
"description": "Dictionary code, 'bob' for bokmål, 'nob' for nynorsk",
"schema": {
"type": "string"
},
"example": "bob"
}
],
"security": [
{
"api_key": []
}
],
"responses": {
"200": {
"description": "bla bla",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/dict/{dict_id}/article/{art_id}": {
"get": {
"summary": "Article lookup",
"description": "Returns an article with a specific numeric ID",
"parameters": [
{
"name": "dict_id",
"in": "path",
"required": true,
"description": "Dictionary code, 'bob' for bokmål, 'nob' for nynorsk",
"schema": {
"type": "string"
},
"example": "bob"
},
{
"name": "art_id",
"in": "path",
"required": true,
"description": "The numeric ID of an article",
"schema": {
"type": "integer"
},
"example": 15544
}
],
"security": [
{
"api_key": []
}
],
"responses": {
"200": {
"description": "bla bla",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/dict/{dict_id}/article/search": {
"get": {
"summary": "Search for a word",
"description": "Search for words as an article lemmas, or words occurring in certain article elements. For instance, old norse _fljúga_ will match the article for modern Norwegian verb _fly_ (meaning to fly)",
"parameters": [
{
"name": "dict_id",
"description": "Dictionary to search, 'bob' for bokmål, 'nob' for nynorsk, 'bob,nob' for both",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "q",
"description": "Query string",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"security": [
{
"api_key": []
}
],
"responses": {
"200": {
"description": "bla bla",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/dict/{dict_id}/article/suggest": {
"get": {
"summary": "Get autocomplete suggestions for a prefix",
"description": "Returns articles for words that begin with the prefix specified in query string 'q'",
"parameters": [
{
"name": "dict_id",
"description": "Dictionary to search, 'bob' for bokmål, 'nob' for nynorsk, 'bob,bob' for both",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "q",
"description": "Query string: prefix for autocomplete",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"security": [
{
"api_key": []
}
],
"responses": {
"200": {
"description": "bla bla",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
},
"securitySchemes": {
"api_key": {
"type": "apiKey",
"name": "x-api-key",
"in": "header"
}
}
}
}
openapi: 3.0.1
info:
title: Ordbok API
description: This API is developed by the University of Bergen. Its purpose is to serve the new national dictionary website wich is under development. No warranty.
version: 1.0.0
servers:
- url: https://ord.uib.no
paths:
/api/suggest:
get:
summary: Autocomplete
description: Suggests search keywords.
parameters:
- name: q
in: query
required: true
description: The search string
schema:
type: string
example: test
- name: dict
in: query
required: true
description: Dictionary code, 'bm' for bokmål, 'nn' for nynorsk, 'bm,nn' for both
schema:
type: string
example: bm,nn
- name: wc
in: query
description: "Filter by word class (part of speech tags: https://universaldependencies.org/u/pos/index.html). "
schema:
type: string
example: NOUN
- name: n
in: query
description: Number of results to return
schema:
type: integer
example: 4
- name: include
in: query
description: "Choose what types of suggestions you want to be included in the response. The parameter should be a concatenation of any of the following characters: e (exact lemma), f (full-text search), i (inflected forms), s (similar - fuzzy search)"
schema:
type: string
example: eis
- name: dform
in: query
description: "dfomr=int turns dictionary codes in the response into integers: 1 = bm, 2 = nn and 3 = bm,nn"
schema:
type: string
example: int
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
/api/articles:
get:
summary: Article search
description: Search for articles. Returns lists of article IDs.
parameters:
- name: w
in: query
required: true
description: Word (Query string)
schema:
type: string
example: test
- name: dict
in: query
required: true
description: Dictionary code, 'bm' for bokmål, 'nn' for nynorsk, 'bm,nn' for both
schema:
type: string
example: bm,nn
- name: wc
in: query
description: "Filter by word class (part of speech tags: https://universaldependencies.org/u/pos/index.html). "
schema:
type: string
example: NOUN
- name: scope
in: query
description: "Define the scope of your query. The parameter should be a concatenation of any of the following characters: e (exact lemma), f (full-text search), i (inflected forms)"
schema:
type: string
example: eif
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
/{dict}/article/{article_id}.json:
get:
summary: Article lookup
description: Returns an article with a specific numeric ID
parameters:
- name: dict
in: path
required: true
description: Dictionary code, 'bm' for bokmål, 'nn' for nynorsk, 'bm,nn' for both
schema:
type: string
example: bm
- name: article_id
in: path
required: true
description: The numeric ID of an article
schema:
type: integer
example: 54131
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
...@@ -7,6 +7,13 @@ Description: > ...@@ -7,6 +7,13 @@ Description: >
Parameters: Parameters:
############################################################################## ##############################################################################
ZoneDomainName:
Type: String
Description: The domain name.
Default: 'ordbok.aws.uib.no'
AllowedPattern: (?!-)[a-zA-Z0-9-.]{1,63}(?<!-)
ConstraintDescription: must be a valid DNS zone name
DomainName: DomainName:
Type: String Type: String
Description: The domain name. Description: The domain name.
...@@ -17,7 +24,7 @@ Parameters: ...@@ -17,7 +24,7 @@ Parameters:
AltDomainName: AltDomainName:
Type: String Type: String
Description: The domain name. Description: The domain name.
Default: 'beta.ordbok.uib.no' Default: 'ordbokene.no'
AllowedPattern: (?!-)[a-zA-Z0-9-.]{1,63}(?<!-) AllowedPattern: (?!-)[a-zA-Z0-9-.]{1,63}(?<!-)
ConstraintDescription: must be a valid DNS zone name ConstraintDescription: must be a valid DNS zone name
...@@ -33,6 +40,19 @@ Parameters: ...@@ -33,6 +40,19 @@ Parameters:
CertificateArn: CertificateArn:
Type: String Type: String
PathRewriteLambdaARN:
Type: String
Description: ARN to lambda function in us-east-1 used to rewrite paths
OrdbokCacheOriginDomain:
Type: String
Description: Domain name for ordbok cache
OrdbokCacheStage:
Type: String
AllowedValues:
- DEV
- PROD
############################################################################### ###############################################################################
Resources: Resources:
...@@ -40,7 +60,7 @@ Resources: ...@@ -40,7 +60,7 @@ Resources:
DNS: DNS:
Type: "AWS::Route53::RecordSet" Type: "AWS::Route53::RecordSet"
Properties: Properties:
HostedZoneName: !Sub "${DomainName}." HostedZoneName: !Sub "${ZoneDomainName}."
Name: !Ref DomainName Name: !Ref DomainName
Type: A Type: A
AliasTarget: AliasTarget:
...@@ -73,70 +93,6 @@ Resources: ...@@ -73,70 +93,6 @@ Resources:
Principal: Principal:
CanonicalUser: !GetAtt CloudFrontOriginIdentity.S3CanonicalUserId CanonicalUser: !GetAtt CloudFrontOriginIdentity.S3CanonicalUserId
ITAIpSet:
Type: "AWS::WAF::IPSet"
Properties:
IPSetDescriptors:
- Type: "IPV4"
Value: "129.177.0.0/16"
- Type: "IPV4"
Value: "82.134.66.114/32"
- Type: "IPV4"
Value: "51.174.68.58/32"
Name: "allowed IPs"
APImatch:
Type: "AWS::WAF::ByteMatchSet"
Properties:
Name: "API paths"
ByteMatchTuples:
- FieldToMatch:
Type: "URI"
TargetString: "/api"
TextTransformation: "NONE"
PositionalConstraint: "EXACTLY"
- FieldToMatch:
Type: "URI"
TargetString: "/api/"
TextTransformation: "NONE"
PositionalConstraint: "STARTS_WITH"
ITARule:
Type: "AWS::WAF::Rule"
Properties:
MetricName: "ITARule"
Name: "ITARule"
Predicates:
- Type: "IPMatch"
Negated: false
DataId: !Ref ITAIpSet
APIRule:
Type: "AWS::WAF::Rule"
Properties:
MetricName: "APIRule"
Name: "APIRule"
Predicates:
- Type: "ByteMatch"
Negated: false
DataId: !Ref APImatch
ACL:
Type: "AWS::WAF::WebACL"
Properties:
DefaultAction:
Type: "BLOCK"
Name: "intern ITA"
MetricName: "WebACL"
Rules:
- Action:
Type: "ALLOW"
Priority: 1
RuleId: !Ref ITARule
- Action:
Type: "ALLOW"
Priority: 5
RuleId: !Ref APIRule
APICachePolicy: APICachePolicy:
Type: "AWS::CloudFront::CachePolicy" Type: "AWS::CloudFront::CachePolicy"
Properties: Properties:
...@@ -156,6 +112,7 @@ Resources: ...@@ -156,6 +112,7 @@ Resources:
HeaderBehavior: whitelist HeaderBehavior: whitelist
Headers: Headers:
- "x-api-key" - "x-api-key"
- cachebuster
Distribution: Distribution:
Type: "AWS::CloudFront::Distribution" Type: "AWS::CloudFront::Distribution"
Properties: Properties:
...@@ -170,8 +127,8 @@ Resources: ...@@ -170,8 +127,8 @@ Resources:
S3OriginConfig: S3OriginConfig:
OriginAccessIdentity: !Sub "origin-access-identity/cloudfront/${CloudFrontOriginIdentity}" OriginAccessIdentity: !Sub "origin-access-identity/cloudfront/${CloudFrontOriginIdentity}"
- Id: OrdbokCache - Id: OrdbokCache
DomainName: "n5speug9cl.execute-api.eu-west-1.amazonaws.com" DomainName: !Ref OrdbokCacheOriginDomain
OriginPath: "/PROD" OriginPath: !Sub "/${OrdbokCacheStage}"
CustomOriginConfig: CustomOriginConfig:
OriginProtocolPolicy: https-only OriginProtocolPolicy: https-only
OriginKeepaliveTimeout: 60 OriginKeepaliveTimeout: 60
...@@ -187,7 +144,7 @@ Resources: ...@@ -187,7 +144,7 @@ Resources:
LambdaFunctionAssociations: LambdaFunctionAssociations:
- EventType: viewer-request - EventType: viewer-request
IncludeBody: false IncludeBody: false
LambdaFunctionARN: "arn:aws:lambda:us-east-1:156160966877:function:path_rewrite:10" LambdaFunctionARN: !Ref PathRewriteLambdaARN
ForwardedValues: ForwardedValues:
QueryString: 'false' QueryString: 'false'
Cookies: Cookies:
...@@ -196,19 +153,15 @@ Resources: ...@@ -196,19 +153,15 @@ Resources:
CacheBehaviors: CacheBehaviors:
- PathPattern: "/api/dict/*" - PathPattern: "/api/dict/*"
AllowedMethods: AllowedMethods:
- HEAD
- DELETE
- POST
- GET - GET
- HEAD
- OPTIONS - OPTIONS
- PUT
- PATCH
CachePolicyId: !Ref APICachePolicy CachePolicyId: !Ref APICachePolicy
TargetOriginId: OrdbokCache TargetOriginId: OrdbokCache
LambdaFunctionAssociations: LambdaFunctionAssociations:
- EventType: viewer-request - EventType: viewer-request
IncludeBody: false IncludeBody: false
LambdaFunctionARN: "arn:aws:lambda:us-east-1:156160966877:function:path_rewrite:11" LambdaFunctionARN: !Ref PathRewriteLambdaARN
ForwardedValues: ForwardedValues:
QueryString: true QueryString: true
Cookies: Cookies:
...@@ -218,7 +171,6 @@ Resources: ...@@ -218,7 +171,6 @@ Resources:
AcmCertificateArn: !Ref CertificateArn AcmCertificateArn: !Ref CertificateArn
MinimumProtocolVersion: TLSv1.1_2016 MinimumProtocolVersion: TLSv1.1_2016
SslSupportMethod: sni-only SslSupportMethod: sni-only
WebACLId: !Ref ACL
Tags: Tags:
- Key: Application - Key: Application
Value: !Ref DomainName Value: !Ref DomainName
......
module.exports = { module.exports = {
presets: [ presets: [
'@vue/app' '@vue/cli-plugin-babel/preset'
] ],
plugins: ["@babel/plugin-proposal-nullish-coalescing-operator", "@babel/plugin-proposal-optional-chaining"]
} }
This diff is collapsed.
...@@ -3,35 +3,44 @@ ...@@ -3,35 +3,44 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve --port 8081",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint",
"i18n:report": "vue-cli-service i18n:report --src \"./src/**/*.?(js|vue)\" --locales \"./src/locales/**/*.json\""
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.2", "axios": "^0.21.1",
"core-js": "^2.6.11", "core-js": "~3.6.5",
"debounce": "^1.2.0", "debounce": "^1.2.1",
"vue": "^2.6.11", "inflection-table": "https://git.app.uib.no/api/v4/projects/16442/jobs/artifacts/1.1.6/raw/module.tar.gz?job=publish",
"vue-awesome": "^3.5.4", "vue": "^2.6.12",
"vue-i18n": "^8.26.7",
"vue-i18n-bridge": "^9.2.0-beta.10",
"vue-material-design-icons": "^4.11.0", "vue-material-design-icons": "^4.11.0",
"vue-mq": "^1.0.1", "vue-meta": "^2.4.0",
"vue-plausible": "^1.0.0", "vue-plausible": "^1.3.1",
"vue-router": "^3.4.1", "vue-router": "^3.5.1",
"vuetify": "^2.4.0" "vuetify": "^2.5.8",
"vuex": "^3.6.2"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^3.12.1", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8",
"@vue/cli-plugin-eslint": "^3.12.1", "@babel/plugin-proposal-optional-chaining": "^7.13.12",
"@vue/cli-service": "^3.12.1", "@intlify/vue-i18n-loader": "^3.2.0",
"@vue/cli-plugin-babel": "^4.5.12",
"@vue/cli-plugin-eslint": "^3.1.1",
"@vue/cli-service": "^4.5.13",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"eslint": "^5.16.0", "eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0", "eslint-plugin-vue": "^5.0.0",
"mark.js": "^8.11.1",
"material-design-icons-iconfont": "^6.1.0", "material-design-icons-iconfont": "^6.1.0",
"sass": "^1.32.0", "sass": "^1.38.0",
"sass-loader": "^10.0.0", "sass-loader": "^10.0.0",
"vue-cli-plugin-vuetify": "~2.1.0", "vue-cli-plugin-i18n": "~2.3.1",
"vue-template-compiler": "^2.6.11", "vue-cli-plugin-vuetify": "^2.1.1",
"vuetify-loader": "^1.7.0" "vue-template-compiler": "^2.6.12",
"vuetify-loader": "^1.7.2"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,
...@@ -42,7 +51,11 @@ ...@@ -42,7 +51,11 @@
"plugin:vue/essential", "plugin:vue/essential",
"eslint:recommended" "eslint:recommended"
], ],
"rules": {}, "rules": {
"no-irregular-whitespace": "off",
"no-unused-vars": "off",
"no-console": "off"
},
"parserOptions": { "parserOptions": {
"parser": "babel-eslint" "parser": "babel-eslint"
} }
......
public/favicon.ico

1.12 KiB | W: 16px | H: 16px

public/favicon.ico

21.6 KiB | W: 256px | H: 256px

public/favicon.ico
public/favicon.ico
public/favicon.ico
public/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
public/favicon_old.ico

16.6 KiB

public/flaks.ico

1.12 KiB