Don't forget to lycansubscribe
35
fork

Configure Feed

Select the types of activity you want to include in your feed.

CORS headers are only needed in development

in production the API isn't called directly from the browser, but through the PDS proxy

+4 -6
+4 -6
app/server.rb
··· 65 65 66 66 before do 67 67 @authenticator = Authenticator.new(hostname: HOSTNAME) 68 + 69 + if settings.development? 70 + headers['Access-Control-Allow-Origin'] = '*' 71 + end 68 72 end 69 73 70 74 get '/xrpc/blue.feeds.lycan.searchPosts' do 71 - headers['access-control-allow-origin'] = '*' 72 - 73 75 @user = load_user 74 76 75 77 if params[:query].to_s.strip.empty? ··· 114 116 end 115 117 116 118 post '/xrpc/blue.feeds.lycan.startImport' do 117 - headers['access-control-allow-origin'] = '*' 118 - 119 119 did = get_user_did 120 120 user = User.find_or_create_by(did: did) 121 121 ··· 132 132 end 133 133 134 134 get '/xrpc/blue.feeds.lycan.getImportStatus' do 135 - headers['access-control-allow-origin'] = '*' 136 - 137 135 did = get_user_did 138 136 user = User.find_by(did: did) 139 137 until_date = user&.imported_until