Skip to content

Commit

Permalink
server asstelinks files for ios and android from ENV variable
Browse files Browse the repository at this point in the history
  • Loading branch information
celuchmarek committed Oct 22, 2024
1 parent fe0eda7 commit f180a63
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 29 deletions.
7 changes: 0 additions & 7 deletions .gitlab/auto-deploy-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,3 @@ persistence:
accessMode: ReadWriteMany
size: 1Gi
storageClass: nfs-client
- name: autogram-server-well-known
mount:
path: /app/public/.well-known
claim:
accessMode: ReadWriteMany
size: 1Mi
storageClass: nfs-client
20 changes: 0 additions & 20 deletions app/controllers/apple_controller.rb

This file was deleted.

9 changes: 9 additions & 0 deletions app/controllers/assetlinks_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class AssetlinksController < ApplicationController
def apple_app_site_association
render :json => JSON.load(Base64.decode64 ENV.fetch('APPLE_APP_SITE_ASSOCIATION', 'e30='))
end

def android_assetlinks
render :json => JSON.load(Base64.decode64 ENV.fetch('ANDROID_ASSEtLINKS', 'e30='))
end
end
5 changes: 3 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
resources :integration_devices, path: '/integration-devices', only: [:index, :destroy]
resource :sign_request, path: '/sign-request', only: [:create]

get '/qr-code', to: redirect('https://sluzby.slovensko.digital/autogram-v-mobile/#download', status: 302)
get '/qr-code', to: redirect(ENV.fetch("QR_CODE_URL_REDIRECT", 'https://sluzby.slovensko.digital/autogram-v-mobile/#download'), status: 302)
end
end

get '/.well-known/apple-app-site-association' => 'apple#apple_app_site_association'
get '/.well-known/apple-app-site-association' => 'assetlinks#apple_app_site_association'
get '/.well-known/assetlinks.json' => 'assetlinks#android_assetlinks'
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html

# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
Expand Down

0 comments on commit f180a63

Please sign in to comment.